Skip to content

Commit

Permalink
fix stories
Browse files Browse the repository at this point in the history
  • Loading branch information
sstraatemans committed Dec 5, 2024
1 parent 21cd1c5 commit 36ecfbb
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions packages/libs/kode-ui/src/components/Table/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,13 @@ export const OpenStyle: Story = {

export const Striped: Story = {
name: 'Striped Table',
render: () => {
render: (args) => {
return (
<Table aria-label="Example static striped collection table" isStriped>
<Table
{...args}
aria-label="Example static striped collection table"
isStriped
>
<TableHeader columns={columns}>
{(column) => (
<Column isRowHeader={column.isRowHeader}>{column.name}</Column>
Expand All @@ -172,9 +176,14 @@ export const Striped: Story = {

export const Compact: Story = {
name: 'Compact Table',
render: () => {
render: (args) => {
return (
<Table aria-label="Example compact data table" isStriped isCompact>
<Table
{...args}
aria-label="Example compact data table"
isStriped
isCompact
>
<TableHeader columns={columns}>
{(column) => (
<Column isRowHeader={column.isRowHeader}>{column.name}</Column>
Expand All @@ -196,9 +205,9 @@ export const Compact: Story = {

export const Link: Story = {
name: 'Link Table',
render: () => {
render: (args) => {
return (
<Table aria-label="Example link data table">
<Table {...args} aria-label="Example link data table">
<TableHeader columns={columns}>
{(column) => (
<Column isRowHeader={column.isRowHeader}>{column.name}</Column>
Expand All @@ -224,7 +233,7 @@ export const Sorting: Story = {
* feature. Reference react-aria docs for more advanced examples:
* https://react-spectrum.adobe.com/react-aria/useTable.html#sorting.
*/
render: () => {
render: (args) => {
const [items, setItems] = useState(rows);
const [sortDescriptor, setSortDescriptor] = useState({});

Expand All @@ -249,6 +258,7 @@ export const Sorting: Story = {

return (
<Table
{...args}
aria-label="Example sortable data table"
sortDescriptor={sortDescriptor}
onSortChange={sort}
Expand Down Expand Up @@ -276,9 +286,9 @@ export const Sorting: Story = {

export const FixedWidth: Story = {
name: 'Table with Fixed column width',
render: () => {
render: (args) => {
return (
<Table aria-label="Example table with nested columns">
<Table {...args} aria-label="Example table with nested columns">
<TableHeader>
<Column isRowHeader width="100">
100px
Expand Down Expand Up @@ -314,9 +324,9 @@ export const FixedWidth: Story = {

export const NestedHeader: Story = {
name: 'Table with Nested Columns',
render: () => {
render: (args) => {
return (
<Table aria-label="Example table with nested columns">
<Table {...args} aria-label="Example table with nested columns">
<TableHeader>
<Column title="Name">
<Column isRowHeader>First Name</Column>
Expand Down

0 comments on commit 36ecfbb

Please sign in to comment.