-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom-table.stories.ts
More file actions
35 lines (32 loc) · 1.05 KB
/
custom-table.stories.ts
File metadata and controls
35 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export default {
title: 'Components/CustomTable',
argTypes: {
currentPage: { control: { type: 'number', min: 1, max: 30, step: 1 } },
dataLength: { control: 'text' },
limit: { control: { type: 'number', min: 1, max: 90, step: 1 } },
isLoading: { control: 'boolean' },
isLoadingError: { control: 'boolean' },
},
};
const Template = args =>
`<custom-table tableHeader="${args.tableHeader}" tableBody="${args.tableBody}" currentPage="${args.currentPage}" dataLength='${args.dataLength}' next='${args.next}' prev="${args.prev}" limit='${args.limit}' rows='${args.rows}' rowsHandler='${args.rowsHandler}' isLoading='${args.isLoading}' isLoadingError='${args.isLoadingError}'></custom-table>`;
export const CustomTable = Template.bind({});
CustomTable.args = {
tableHeader: [
{ a: 1, b: 2 },
{ c: 3, d: 4 },
],
tableBody: [
{ p: 1, q: 2 },
{ r: 6, s: 7 },
],
currentPage: '1',
dataLength: '20',
next: '',
prev: '',
limit: '30',
rows: [1, 2, 3, 4],
rowsHandler: '',
isLoading: 'false',
isLoadingError: 'false',
};