@bsol-oss/react-datatable5 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-3920d97c51b8ad2521918fb1205babd22b0ed3d7 +1 -0
  2. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-43fdebe5fc35e4e9fabee9a83c7faea931b05ea0 +1 -0
  3. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-f086b87885981c04ce7a583ff90a49313de83de7 +1 -0
  4. package/.eslintrc.cjs +19 -0
  5. package/.prettierignore +4 -0
  6. package/.storybook/main.ts +20 -0
  7. package/.storybook/preview.ts +14 -0
  8. package/README.md +42 -0
  9. package/package.json +59 -0
  10. package/prettier.json +6 -0
  11. package/rollup.config.js +10 -0
  12. package/src/assets/react.svg +1 -0
  13. package/src/components/ChakraDataTable.tsx +279 -0
  14. package/src/components/DataTable.tsx +97 -0
  15. package/src/components/DataTableContext.tsx +13 -0
  16. package/src/components/EditFilterButton.tsx +37 -0
  17. package/src/components/EditSortingButton.tsx +37 -0
  18. package/src/components/EditViewButton.tsx +46 -0
  19. package/src/components/PageSizeControl.tsx +29 -0
  20. package/src/components/ResetFilteringButton.tsx +18 -0
  21. package/src/components/ResetSortingButton.tsx +18 -0
  22. package/src/components/Table.tsx +20 -0
  23. package/src/components/TableBody.tsx +23 -0
  24. package/src/components/TableCardContainer.tsx +22 -0
  25. package/src/components/TableCards.tsx +36 -0
  26. package/src/components/TableFilter.tsx +34 -0
  27. package/src/components/TableFooter.tsx +27 -0
  28. package/src/components/TableHeader.tsx +106 -0
  29. package/src/components/TablePagination.tsx +57 -0
  30. package/src/components/TableSorter.tsx +62 -0
  31. package/src/components/TextCell.tsx +18 -0
  32. package/src/components/useDataFromUrl.tsx +52 -0
  33. package/src/components/useDataTable.tsx +7 -0
  34. package/src/index.tsx +27 -0
  35. package/src/stories/Button.stories.ts +52 -0
  36. package/src/stories/Button.tsx +52 -0
  37. package/src/stories/CardViewShowcase.tsx +103 -0
  38. package/src/stories/Configure.mdx +369 -0
  39. package/src/stories/DataTable-test.stories.tsx +83 -0
  40. package/src/stories/DataTable.stories.tsx +57 -0
  41. package/src/stories/DefaultDataTable.tsx +141 -0
  42. package/src/stories/Header.stories.ts +33 -0
  43. package/src/stories/Header.tsx +71 -0
  44. package/src/stories/Page.stories.ts +32 -0
  45. package/src/stories/Page.tsx +91 -0
  46. package/src/stories/TableViewShowcase.tsx +105 -0
  47. package/src/stories/assets/accessibility.png +0 -0
  48. package/src/stories/assets/accessibility.svg +5 -0
  49. package/src/stories/assets/addon-library.png +0 -0
  50. package/src/stories/assets/assets.png +0 -0
  51. package/src/stories/assets/avif-test-image.avif +0 -0
  52. package/src/stories/assets/context.png +0 -0
  53. package/src/stories/assets/discord.svg +15 -0
  54. package/src/stories/assets/docs.png +0 -0
  55. package/src/stories/assets/figma-plugin.png +0 -0
  56. package/src/stories/assets/github.svg +3 -0
  57. package/src/stories/assets/share.png +0 -0
  58. package/src/stories/assets/styling.png +0 -0
  59. package/src/stories/assets/testing.png +0 -0
  60. package/src/stories/assets/theming.png +0 -0
  61. package/src/stories/assets/tutorials.svg +12 -0
  62. package/src/stories/assets/youtube.svg +4 -0
  63. package/src/stories/button.css +30 -0
  64. package/src/stories/header.css +32 -0
  65. package/src/stories/page.css +69 -0
  66. package/src/vite-env.d.ts +1 -0
  67. package/tsconfig.json +25 -0
  68. package/tsconfig.node.json +11 -0
  69. package/vite.config.ts +7 -0
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import "./button.css";
3
+
4
+ interface ButtonProps {
5
+ /**
6
+ * Is this the principal call to action on the page?
7
+ */
8
+ primary?: boolean;
9
+ /**
10
+ * What background color to use
11
+ */
12
+ backgroundColor?: string;
13
+ /**
14
+ * How large should the button be?
15
+ */
16
+ size?: "small" | "medium" | "large";
17
+ /**
18
+ * Button contents
19
+ */
20
+ label: string;
21
+ /**
22
+ * Optional click handler
23
+ */
24
+ onClick?: () => void;
25
+ }
26
+
27
+ /**
28
+ * Primary UI component for user interaction
29
+ */
30
+ export const Button = ({
31
+ primary = false,
32
+ size = "medium",
33
+ backgroundColor,
34
+ label,
35
+ ...props
36
+ }: ButtonProps) => {
37
+ const mode = primary
38
+ ? "storybook-button--primary"
39
+ : "storybook-button--secondary";
40
+ return (
41
+ <button
42
+ type="button"
43
+ className={["storybook-button", `storybook-button--${size}`, mode].join(
44
+ " ",
45
+ )}
46
+ style={{ backgroundColor }}
47
+ {...props}
48
+ >
49
+ {label}
50
+ </button>
51
+ );
52
+ };
@@ -0,0 +1,103 @@
1
+ // import React from 'react';
2
+ import { ButtonGroup, ChakraProvider, theme } from "@chakra-ui/react";
3
+ import { ColumnDef, createColumnHelper } from "@tanstack/react-table";
4
+ import DataTable from "../components/DataTable";
5
+ import EditFilterButton from "../components/EditFilterButton";
6
+ import EditSortingButton from "../components/EditSortingButton";
7
+ import EditViewButton from "../components/EditViewButton";
8
+ import PageSizeControl from "../components/PageSizeControl";
9
+ import TableCardContainer from "../components/TableCardContainer";
10
+ import TableCards from "../components/TableCards";
11
+ import TablePagination from "../components/TablePagination";
12
+ import TextCell from "../components/TextCell";
13
+
14
+ interface ChatRecord {
15
+ session_id: string;
16
+ last_user_message: string;
17
+ last_system_response: string;
18
+ total_token: number;
19
+ total_prompt_tokens: number;
20
+ total_completion_tokens: number;
21
+ total_normalise_tokens: number;
22
+ chat_type: string;
23
+ model: string;
24
+ created_by: string;
25
+ last_update: string;
26
+ }
27
+
28
+ interface RowActionsProps {
29
+ row: ChatRecord;
30
+ }
31
+
32
+ const RowActions = ({ row }: RowActionsProps) => {
33
+ return <>no actions</>;
34
+ };
35
+
36
+ const CardViewShowcase = () => {
37
+ const columnHelper = createColumnHelper<ChatRecord>();
38
+
39
+ const columns: ColumnDef<ChatRecord>[] = [
40
+ // Display Column
41
+ columnHelper.display({
42
+ id: "actions",
43
+ header: () => <span>Actions</span>,
44
+ cell: (props) => <RowActions row={props.row.original} />,
45
+ }),
46
+
47
+ // Grouping Column
48
+ columnHelper.group({
49
+ header: "Information",
50
+ footer: (props) => props.column.id,
51
+ columns: [
52
+ columnHelper.accessor("session_id", {
53
+ cell: (props) => {
54
+ return <TextCell>{props.row.original.session_id}</TextCell>;
55
+ },
56
+ header: () => <span>Session Id</span>,
57
+ footer: (props) => props.column.id,
58
+ }),
59
+ columnHelper.accessor("last_user_message", {
60
+ cell: (props) => {
61
+ return <TextCell>{props.row.original.last_user_message}</TextCell>;
62
+ },
63
+
64
+ header: () => <span>User Message</span>,
65
+ footer: (props) => props.column.id,
66
+ }),
67
+ // Accessor Column
68
+ columnHelper.accessor("total_token", {
69
+ cell: (props) => {
70
+ return <TextCell>{props.row.original.total_token}</TextCell>;
71
+ },
72
+ header: () => <span>Total Token</span>,
73
+ footer: (props) => props.column.id,
74
+ sortDescFirst: false,
75
+ }),
76
+ ],
77
+ }),
78
+ ];
79
+
80
+ return (
81
+ <ChakraProvider theme={theme}>
82
+ <DataTable
83
+ columns={columns}
84
+ url={"http://localhost:8333/api/v1/gpt/chat/history/all"}
85
+ >
86
+ <TablePagination />
87
+ <ButtonGroup isAttached>
88
+ <EditViewButton />
89
+ <EditFilterButton />
90
+ <EditSortingButton />
91
+ </ButtonGroup>
92
+
93
+ <TableCardContainer>
94
+ <TableCards />
95
+ </TableCardContainer>
96
+ <PageSizeControl />
97
+ <TablePagination />
98
+ </DataTable>
99
+ </ChakraProvider>
100
+ );
101
+ };
102
+
103
+ export default CardViewShowcase;
@@ -0,0 +1,369 @@
1
+ import { Meta } from "@storybook/blocks";
2
+
3
+ import Github from "./assets/github.svg";
4
+ import Discord from "./assets/discord.svg";
5
+ import Youtube from "./assets/youtube.svg";
6
+ import Tutorials from "./assets/tutorials.svg";
7
+ import Styling from "./assets/styling.png";
8
+ import Context from "./assets/context.png";
9
+ import Assets from "./assets/assets.png";
10
+ import Docs from "./assets/docs.png";
11
+ import Share from "./assets/share.png";
12
+ import FigmaPlugin from "./assets/figma-plugin.png";
13
+ import Testing from "./assets/testing.png";
14
+ import Accessibility from "./assets/accessibility.png";
15
+ import Theming from "./assets/theming.png";
16
+ import AddonLibrary from "./assets/addon-library.png";
17
+
18
+ export const RightArrow = () => (
19
+ <svg
20
+ viewBox="0 0 14 14"
21
+ width="8px"
22
+ height="14px"
23
+ style={{
24
+ marginLeft: "4px",
25
+ display: "inline-block",
26
+ shapeRendering: "inherit",
27
+ verticalAlign: "middle",
28
+ fill: "currentColor",
29
+ "path fill": "currentColor",
30
+ }}
31
+ >
32
+ <path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
33
+ </svg>
34
+ );
35
+
36
+ <Meta title="Configure your project" />
37
+
38
+ <div className="sb-container">
39
+ <div className='sb-section-title'>
40
+ # Configure your project
41
+
42
+ Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
43
+
44
+ </div>
45
+ <div className="sb-section">
46
+ <div className="sb-section-item">
47
+ <img
48
+ src={Styling}
49
+ alt="A wall of logos representing different styling technologies"
50
+ />
51
+ <h4 className="sb-section-item-heading">Add styling and CSS</h4>
52
+ <p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
53
+ <a
54
+ href="https://storybook.js.org/docs/react/configure/styling-and-css"
55
+ target="_blank"
56
+ >Learn more<RightArrow /></a>
57
+ </div>
58
+ <div className="sb-section-item">
59
+ <img
60
+ src={Context}
61
+ alt="An abstraction representing the composition of data for a component"
62
+ />
63
+ <h4 className="sb-section-item-heading">Provide context and mocking</h4>
64
+ <p className="sb-section-item-paragraph">Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.</p>
65
+ <a
66
+ href="https://storybook.js.org/docs/react/writing-stories/decorators#context-for-mocking"
67
+ target="_blank"
68
+ >Learn more<RightArrow /></a>
69
+ </div>
70
+ <div className="sb-section-item">
71
+ <img src={Assets} alt="A representation of typography and image assets" />
72
+ <div>
73
+ <h4 className="sb-section-item-heading">Load assets and resources</h4>
74
+ <p className="sb-section-item-paragraph">To link static files (like fonts) to your projects and stories, use the
75
+ `staticDirs` configuration option to specify folders to load when
76
+ starting Storybook.</p>
77
+ <a
78
+ href="https://storybook.js.org/docs/react/configure/images-and-assets"
79
+ target="_blank"
80
+ >Learn more<RightArrow /></a>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ <div className="sb-container">
86
+ <div className='sb-section-title'>
87
+ # Do more with Storybook
88
+
89
+ Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
90
+
91
+ </div>
92
+
93
+ <div className="sb-section">
94
+ <div className="sb-features-grid">
95
+ <div className="sb-grid-item">
96
+ <img src={Docs} alt="A screenshot showing the autodocs tag being set, pointing a docs page being generated" />
97
+ <h4 className="sb-section-item-heading">Autodocs</h4>
98
+ <p className="sb-section-item-paragraph">Auto-generate living,
99
+ interactive reference documentation from your components and stories.</p>
100
+ <a
101
+ href="https://storybook.js.org/docs/react/writing-docs/autodocs"
102
+ target="_blank"
103
+ >Learn more<RightArrow /></a>
104
+ </div>
105
+ <div className="sb-grid-item">
106
+ <img src={Share} alt="A browser window showing a Storybook being published to a chromatic.com URL" />
107
+ <h4 className="sb-section-item-heading">Publish to Chromatic</h4>
108
+ <p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
109
+ <a
110
+ href="https://storybook.js.org/docs/react/sharing/publish-storybook#publish-storybook-with-chromatic"
111
+ target="_blank"
112
+ >Learn more<RightArrow /></a>
113
+ </div>
114
+ <div className="sb-grid-item">
115
+ <img src={FigmaPlugin} alt="Windows showing the Storybook plugin in Figma" />
116
+ <h4 className="sb-section-item-heading">Figma Plugin</h4>
117
+ <p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
118
+ implementation in one place.</p>
119
+ <a
120
+ href="https://storybook.js.org/docs/react/sharing/design-integrations#embed-storybook-in-figma-with-the-plugin"
121
+ target="_blank"
122
+ >Learn more<RightArrow /></a>
123
+ </div>
124
+ <div className="sb-grid-item">
125
+ <img src={Testing} alt="Screenshot of tests passing and failing" />
126
+ <h4 className="sb-section-item-heading">Testing</h4>
127
+ <p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
128
+ complex.</p>
129
+ <a
130
+ href="https://storybook.js.org/docs/react/writing-tests"
131
+ target="_blank"
132
+ >Learn more<RightArrow /></a>
133
+ </div>
134
+ <div className="sb-grid-item">
135
+ <img src={Accessibility} alt="Screenshot of accessibility tests passing and failing" />
136
+ <h4 className="sb-section-item-heading">Accessibility</h4>
137
+ <p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
138
+ <a
139
+ href="https://storybook.js.org/docs/react/writing-tests/accessibility-testing"
140
+ target="_blank"
141
+ >Learn more<RightArrow /></a>
142
+ </div>
143
+ <div className="sb-grid-item">
144
+ <img src={Theming} alt="Screenshot of Storybook in light and dark mode" />
145
+ <h4 className="sb-section-item-heading">Theming</h4>
146
+ <p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
147
+ <a
148
+ href="https://storybook.js.org/docs/react/configure/theming"
149
+ target="_blank"
150
+ >Learn more<RightArrow /></a>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ <div className='sb-addon'>
156
+ <div className='sb-addon-text'>
157
+ <h4>Addons</h4>
158
+ <p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
159
+ <a
160
+ href="https://storybook.js.org/integrations/"
161
+ target="_blank"
162
+ >Discover all addons<RightArrow /></a>
163
+ </div>
164
+ <div className='sb-addon-img'>
165
+ <img src={AddonLibrary} alt="Integrate your tools with Storybook to connect workflows." />
166
+ </div>
167
+ </div>
168
+
169
+ <div className="sb-section sb-socials">
170
+ <div className="sb-section-item">
171
+ <img src={Github} alt="Github logo" className="sb-explore-image"/>
172
+ Join our contributors building the future of UI development.
173
+
174
+ <a
175
+ href="https://github.com/storybookjs/storybook"
176
+ target="_blank"
177
+ >Star on GitHub<RightArrow /></a>
178
+ </div>
179
+ <div className="sb-section-item">
180
+ <img src={Discord} alt="Discord logo" className="sb-explore-image"/>
181
+ <div>
182
+ Get support and chat with frontend developers.
183
+
184
+ <a
185
+ href="https://discord.gg/storybook"
186
+ target="_blank"
187
+ >Join Discord server<RightArrow /></a>
188
+ </div>
189
+ </div>
190
+ <div className="sb-section-item">
191
+ <img src={Youtube} alt="Youtube logo" className="sb-explore-image"/>
192
+ <div>
193
+ Watch tutorials, feature previews and interviews.
194
+
195
+ <a
196
+ href="https://www.youtube.com/@chromaticui"
197
+ target="_blank"
198
+ >Watch on YouTube<RightArrow /></a>
199
+ </div>
200
+ </div>
201
+ <div className="sb-section-item">
202
+ <img src={Tutorials} alt="A book" className="sb-explore-image"/>
203
+ <p>Follow guided walkthroughs on for key workflows.</p>
204
+
205
+ <a
206
+ href="https://storybook.js.org/tutorials/"
207
+ target="_blank"
208
+ >Discover tutorials<RightArrow /></a>
209
+ </div>
210
+
211
+ </div>
212
+
213
+ <style>
214
+ {`
215
+ .sb-container {
216
+ margin-bottom: 48px;
217
+ }
218
+
219
+ .sb-section {
220
+ width: 100%;
221
+ display: flex;
222
+ flex-direction: row;
223
+ gap: 20px;
224
+ }
225
+
226
+ img {
227
+ object-fit: cover;
228
+ }
229
+
230
+ .sb-section-title {
231
+ margin-bottom: 32px;
232
+ }
233
+
234
+ .sb-section a:not(h1 a, h2 a, h3 a) {
235
+ font-size: 14px;
236
+ }
237
+
238
+ .sb-section-item, .sb-grid-item {
239
+ flex: 1;
240
+ display: flex;
241
+ flex-direction: column;
242
+ }
243
+
244
+ .sb-section-item-heading {
245
+ padding-top: 20px !important;
246
+ padding-bottom: 5px !important;
247
+ margin: 0 !important;
248
+ }
249
+ .sb-section-item-paragraph {
250
+ margin: 0;
251
+ padding-bottom: 10px;
252
+ }
253
+
254
+ .sb-chevron {
255
+ margin-left: 5px;
256
+ }
257
+
258
+ .sb-features-grid {
259
+ display: grid;
260
+ grid-template-columns: repeat(2, 1fr);
261
+ grid-gap: 32px 20px;
262
+ }
263
+
264
+ .sb-socials {
265
+ display: grid;
266
+ grid-template-columns: repeat(4, 1fr);
267
+ }
268
+
269
+ .sb-socials p {
270
+ margin-bottom: 10px;
271
+ }
272
+
273
+ .sb-explore-image {
274
+ max-height: 32px;
275
+ align-self: flex-start;
276
+ }
277
+
278
+ .sb-addon {
279
+ width: 100%;
280
+ display: flex;
281
+ align-items: center;
282
+ position: relative;
283
+ background-color: #EEF3F8;
284
+ border-radius: 5px;
285
+ border: 1px solid rgba(0, 0, 0, 0.05);
286
+ background: #EEF3F8;
287
+ height: 180px;
288
+ margin-bottom: 48px;
289
+ overflow: hidden;
290
+ }
291
+
292
+ .sb-addon-text {
293
+ padding-left: 48px;
294
+ max-width: 240px;
295
+ }
296
+
297
+ .sb-addon-text h4 {
298
+ padding-top: 0px;
299
+ }
300
+
301
+ .sb-addon-img {
302
+ position: absolute;
303
+ left: 345px;
304
+ top: 0;
305
+ height: 100%;
306
+ width: 200%;
307
+ overflow: hidden;
308
+ }
309
+
310
+ .sb-addon-img img {
311
+ width: 650px;
312
+ transform: rotate(-15deg);
313
+ margin-left: 40px;
314
+ margin-top: -72px;
315
+ box-shadow: 0 0 1px rgba(255, 255, 255, 0);
316
+ backface-visibility: hidden;
317
+ }
318
+
319
+ @media screen and (max-width: 800px) {
320
+ .sb-addon-img {
321
+ left: 300px;
322
+ }
323
+ }
324
+
325
+ @media screen and (max-width: 600px) {
326
+ .sb-section {
327
+ flex-direction: column;
328
+ }
329
+
330
+ .sb-features-grid {
331
+ grid-template-columns: repeat(1, 1fr);
332
+ }
333
+
334
+ .sb-socials {
335
+ grid-template-columns: repeat(2, 1fr);
336
+ }
337
+
338
+ .sb-addon {
339
+ height: 280px;
340
+ align-items: flex-start;
341
+ padding-top: 32px;
342
+ overflow: hidden;
343
+ }
344
+
345
+ .sb-addon-text {
346
+ padding-left: 24px;
347
+ }
348
+
349
+ .sb-addon-img {
350
+ right: 0;
351
+ left: 0;
352
+ top: 130px;
353
+ bottom: 0;
354
+ overflow: hidden;
355
+ height: auto;
356
+ width: 124%;
357
+ }
358
+
359
+ .sb-addon-img img {
360
+ width: 1200px;
361
+ transform: rotate(-12deg);
362
+ margin-left: 0;
363
+ margin-top: 48px;
364
+ margin-bottom: -40px;
365
+ margin-left: -24px;
366
+ }
367
+ }
368
+ `}
369
+ </style>
@@ -0,0 +1,83 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import TableViewShowcase from "./TableViewShowcase";
3
+ import CardViewShowcase from "./CardViewShowcase";
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
+ const meta = {
7
+ title: "Example/Table/tableview",
8
+ component: TableViewShowcase,
9
+ parameters: {
10
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
11
+ // layout: 'centered',
12
+ },
13
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
14
+ tags: ["autodocs"],
15
+ // More on argTypes: https://storybook.js.org/docs/api/argtypes
16
+ argTypes: {
17
+ // backgroundColor: { control: 'color' },
18
+ },
19
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
20
+ // args: { onClick: fn() },
21
+ } satisfies Meta<typeof TableViewShowcase>;
22
+
23
+ export default meta;
24
+ type Story = StoryObj<typeof meta>;
25
+
26
+ export const TableView: Story = {
27
+ render: () => {
28
+ return <TableViewShowcase />;
29
+ },
30
+ };
31
+
32
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
33
+ // export const metaCard = {
34
+ // title: "Example/Brararara/testt",
35
+ // component: CardViewShowcase,
36
+ // parameters: {
37
+ // // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
38
+ // // layout: 'centered',
39
+ // },
40
+ // // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
41
+ // tags: ["autodocs"],
42
+ // // More on argTypes: https://storybook.js.org/docs/api/argtypes
43
+ // argTypes: {
44
+ // // backgroundColor: { control: 'color' },
45
+ // },
46
+ // // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
47
+ // // args: { onClick: fn() },
48
+ // } satisfies Meta<typeof CardViewShowcase>;
49
+
50
+ // type StoryCard = StoryObj<typeof metaCard>;
51
+ export const CardView = {
52
+ render: () => {
53
+ return <CardViewShowcase />;
54
+ },
55
+ };
56
+
57
+ // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
58
+ // export const Primary: Story = {
59
+ // args: {
60
+ // primary: true,
61
+ // label: 'Button',
62
+ // },
63
+ // };
64
+
65
+ // export const Secondary: Story = {
66
+ // args: {
67
+ // label: 'Button',
68
+ // },
69
+ // };
70
+
71
+ // export const Large: Story = {
72
+ // args: {
73
+ // size: 'large',
74
+ // label: 'Button',
75
+ // },
76
+ // };
77
+
78
+ // export const Small: Story = {
79
+ // args: {
80
+ // size: 'small',
81
+ // label: 'Button',
82
+ // },
83
+ // };
@@ -0,0 +1,57 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import DefaultDataTable from "./DefaultDataTable";
3
+
4
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
5
+ const meta = {
6
+ title: "Example/obsolete/table",
7
+ component: DefaultDataTable,
8
+ parameters: {
9
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
10
+ // layout: 'centered',
11
+ },
12
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
13
+ tags: ["autodocs"],
14
+ // More on argTypes: https://storybook.js.org/docs/api/argtypes
15
+ argTypes: {
16
+ // backgroundColor: { control: 'color' },
17
+ },
18
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
19
+ // args: { onClick: fn() },
20
+ } satisfies Meta<typeof DefaultDataTable>;
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+
25
+ export const Primary: Story = {
26
+ render: () => {
27
+ return <DefaultDataTable />;
28
+ },
29
+ };
30
+
31
+ // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
32
+ // export const Primary: Story = {
33
+ // args: {
34
+ // primary: true,
35
+ // label: 'Button',
36
+ // },
37
+ // };
38
+
39
+ // export const Secondary: Story = {
40
+ // args: {
41
+ // label: 'Button',
42
+ // },
43
+ // };
44
+
45
+ // export const Large: Story = {
46
+ // args: {
47
+ // size: 'large',
48
+ // label: 'Button',
49
+ // },
50
+ // };
51
+
52
+ // export const Small: Story = {
53
+ // args: {
54
+ // size: 'small',
55
+ // label: 'Button',
56
+ // },
57
+ // };