mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 01:26:44 +00:00
* ensure that eslint runs on all frontend code * remove tslint from `design-system` * enable prettier and eslint-prettier for `design-system` * Delete tslint.json * use a single editorconfig for the repo * enable prettier for all code in `design-system` * more linting fixes on design-system * ignore coverage for git and prettier * lintfix on editor-ui
55 lines
883 B
JavaScript
55 lines
883 B
JavaScript
import N8nRadioButtons from './RadioButtons.vue';
|
|
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
export default {
|
|
title: 'Atoms/RadioButtons',
|
|
component: N8nRadioButtons,
|
|
argTypes: {
|
|
size: {
|
|
type: 'select',
|
|
options: ['small', 'medium'],
|
|
},
|
|
},
|
|
parameters: {
|
|
backgrounds: { default: '--color-background-xlight' },
|
|
},
|
|
};
|
|
|
|
const methods = {
|
|
onInput: action('input'),
|
|
};
|
|
|
|
const Template = (args, { argTypes }) => ({
|
|
props: Object.keys(argTypes),
|
|
components: {
|
|
N8nRadioButtons,
|
|
},
|
|
template: `<n8n-radio-buttons v-model="val" v-bind="$props" @input="onInput">
|
|
</n8n-radio-buttons>`,
|
|
methods,
|
|
data() {
|
|
return {
|
|
val: '',
|
|
};
|
|
},
|
|
});
|
|
|
|
export const Example = Template.bind({});
|
|
Example.args = {
|
|
options: [
|
|
{
|
|
label: 'Test',
|
|
value: 'test',
|
|
},
|
|
{
|
|
label: 'World',
|
|
value: 'world',
|
|
},
|
|
{
|
|
label: 'Hello',
|
|
value: 'hello',
|
|
},
|
|
],
|
|
};
|