Skip to content

Custom Table Header Props

export function CustomTableHeaderPropsStoryComponent({
thClassName
}: {
thClassName: string;
}) {
const headers: TableColumnType<StoryColumnType>[] = [
{
prop: 'name',
title: 'Name'
},
{
prop: 'username',
title: 'Username'
},
{
prop: 'location',
title: 'Location'
},
{
prop: 'date',
title: 'Last Update'
},
{
prop: 'score',
title: 'Score',
thProps: {
className: thClassName
}
}
];
return (
<DatatableWrapper body={TABLE_DATA} headers={headers}>
<Table>
<TableHeader />
<TableBody />
</Table>
</DatatableWrapper>
);
}