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
49 lines
982 B
JavaScript
49 lines
982 B
JavaScript
import N8nActionToggle from './ActionToggle.vue';
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
export default {
|
|
title: 'Atoms/ActionToggle',
|
|
component: N8nActionToggle,
|
|
argTypes: {
|
|
placement: {
|
|
type: 'select',
|
|
options: ['top', 'top-start', 'top-end', 'bottom', 'bottom-end'],
|
|
},
|
|
size: {
|
|
type: 'select',
|
|
options: ['mini', 'small', 'medium'],
|
|
},
|
|
},
|
|
parameters: {
|
|
backgrounds: { default: '--color-background-light' },
|
|
},
|
|
};
|
|
|
|
const methods = {
|
|
onAction: action('action'),
|
|
};
|
|
|
|
const Template = (args, { argTypes }) => ({
|
|
props: Object.keys(argTypes),
|
|
components: {
|
|
N8nActionToggle,
|
|
},
|
|
template:
|
|
'<div style="height:300px;width:300px;display:flex;align-items:center;justify-content:center"><n8n-action-toggle v-bind="$props" @action="onAction" /></div>',
|
|
methods,
|
|
});
|
|
|
|
export const ActionToggle = Template.bind({});
|
|
ActionToggle.args = {
|
|
actions: [
|
|
{
|
|
label: 'Go',
|
|
value: 'go',
|
|
},
|
|
{
|
|
label: 'Stop',
|
|
value: 'stop',
|
|
},
|
|
],
|
|
};
|