diff --git a/packages/design-system/src/components/N8nCheckbox/Checkbox.stories.ts b/packages/design-system/src/components/N8nCheckbox/Checkbox.stories.ts new file mode 100644 index 0000000000..a253cba7ac --- /dev/null +++ b/packages/design-system/src/components/N8nCheckbox/Checkbox.stories.ts @@ -0,0 +1,36 @@ +/* tslint:disable:variable-name */ +import N8nCheckbox from "./Checkbox.vue"; +import { StoryFn } from '@storybook/vue'; +import { action } from '@storybook/addon-actions'; + +export default { + title: 'Atoms/Checkbox', + component: N8nCheckbox, +}; + +const methods = { + onInput: action('input'), + onFocus: action('focus'), + onChange: action('change'), +}; + +const DefaultTemplate: StoryFn = (args, { argTypes }) => ({ + props: Object.keys(argTypes), + components: { + N8nCheckbox, + }, + data: () => ({ + isChecked: false, + }), + template: '', + methods, +}); + +export const Default = DefaultTemplate.bind({}); +Default.args = { + label: 'This is a default checkbox', + tooltipText: 'Checkbox tooltip', + disabled: false, + indeterminate: false, + size: 'small', +}; diff --git a/packages/design-system/src/components/N8nCheckbox/Checkbox.vue b/packages/design-system/src/components/N8nCheckbox/Checkbox.vue new file mode 100644 index 0000000000..88c4c31780 --- /dev/null +++ b/packages/design-system/src/components/N8nCheckbox/Checkbox.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/packages/design-system/src/components/N8nCheckbox/index.ts b/packages/design-system/src/components/N8nCheckbox/index.ts new file mode 100644 index 0000000000..a60ee7eb39 --- /dev/null +++ b/packages/design-system/src/components/N8nCheckbox/index.ts @@ -0,0 +1,3 @@ +import N8nCheckbox from './Checkbox.vue'; + +export default N8nCheckbox; diff --git a/packages/design-system/src/components/N8nFormInput/FormInput.vue b/packages/design-system/src/components/N8nFormInput/FormInput.vue index e81476f2d1..659368f09d 100644 --- a/packages/design-system/src/components/N8nFormInput/FormInput.vue +++ b/packages/design-system/src/components/N8nFormInput/FormInput.vue @@ -1,5 +1,12 @@