generated from gravity-ui/package-example
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Table): added options to complex disable sorting or filtration
- Loading branch information
tapo4ek
committed
Sep 24, 2024
1 parent
e60315f
commit ed328cc
Showing
6 changed files
with
83 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 19 additions & 8 deletions
27
src/components/TableSettings/__stories__/TableSettings.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
import React from 'react'; | ||
|
||
import type {Meta, StoryObj} from '@storybook/react'; | ||
|
||
import type {TableSettingsOptions} from '../TableSettings'; | ||
|
||
import {TableSettingsColumnStory} from './stories/TableSettingsColumnStory'; | ||
import {TableSettingsStory} from './stories/TableSettingsStory'; | ||
|
||
const meta: Meta<typeof TableSettings> = { | ||
const meta: Meta<TableSettingsOptions> = { | ||
title: 'Table settings', | ||
component: TableSettingsStory, | ||
argTypes: { | ||
sortable: { | ||
control: 'boolean', | ||
}, | ||
filterable: { | ||
control: 'boolean', | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const TableSettings: StoryObj<typeof TableSettingsStory> = { | ||
render: TableSettingsStory, | ||
}; | ||
export const TableSettings = { | ||
render: (args) => <TableSettingsStory {...args} />, | ||
} as StoryObj<typeof TableSettingsStory>; | ||
|
||
export const TableSettingsColumn: StoryObj<typeof TableSettingsColumnStory> = { | ||
render: TableSettingsColumnStory, | ||
}; | ||
export const TableSettingsColumn = { | ||
render: (args) => <TableSettingsColumnStory {...args} />, | ||
} as StoryObj<typeof TableSettingsColumnStory>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters