diff --git a/components/src/stories/Table.stories.js b/components/src/stories/Table.stories.js new file mode 100644 index 00000000..a322fad2 --- /dev/null +++ b/components/src/stories/Table.stories.js @@ -0,0 +1,59 @@ +import Table from '~widgets/table/widget.vue'; +import registerWidget from '~core/registerWidget'; + +registerWidget('ui-table', Table); + + +export const Component = { + render: (args) => ({ + setup() { + return { args }; + }, + template: ` + + John + Doe + 57 + + + Mary + Stephen + 26 + + `, + }), + + args: { + headers: [ + { + name: 'name', + width: '80px', + text: "Name", + }, + { + name: 'lastname', + width: '80px', + text: "LastName", + }, + { + name: 'age', + width: '40px', + text: "Age", + }, + ], + }, +}; + +export default { + title: 'Components/Table', + component: Table, + parameters: { + layout: 'centered', + }, + argTypes: { + headers: { + control: 'object', + }, + fixed: 'boolean', + }, +};