Skip to content

Commit 3b501e2

Browse files
committed
[no ci] Add story to test ability to set DataTable column width
1 parent c47cc57 commit 3b501e2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/ra-ui-materialui/src/list/datatable/DataTableColumn.stories.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,17 @@ export const TableCellProps = () => (
235235
</Wrapper>
236236
);
237237

238+
export const Width = () => (
239+
<Wrapper>
240+
<DataTable>
241+
<DataTable.Col source="id" sx={{ width: 50 }} />
242+
<DataTable.Col source="title" sx={{ width: 500 }} />
243+
<DataTable.Col source="author" />
244+
<DataTable.Col source="year" />
245+
</DataTable>
246+
</Wrapper>
247+
);
248+
238249
const TitleCol = () => <DataTable.Col source="title" label="Book Title" />;
239250
const AuthorCol = () => <DataTable.Col source="author" />;
240251

0 commit comments

Comments
 (0)