feat(editor): Upgrade Storybook to 8.0 (no-changelog) (#8867)
This commit is contained in:
committed by
GitHub
parent
948c383999
commit
572af38383
@@ -1,7 +1,14 @@
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { type StoryFn } from '@storybook/vue3';
|
||||
import { type ActionOptions, action } from '@storybook/addon-actions';
|
||||
import N8nResizeWrapper from './ResizeWrapper.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
// TODO: remove this after converting ResizeWrapper to composition API
|
||||
interface ResizeData extends ActionOptions {
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
|
||||
export default {
|
||||
title: 'Atoms/ResizeWrapper',
|
||||
component: N8nResizeWrapper,
|
||||
@@ -13,12 +20,12 @@ const methods = {
|
||||
onResizeStart: action('resizestart'),
|
||||
};
|
||||
|
||||
const Template = (args, { argTypes }) => ({
|
||||
const Template: StoryFn = (args, { argTypes }) => ({
|
||||
setup: () => {
|
||||
const newWidth = ref(args.width);
|
||||
const newHeight = ref(args.height);
|
||||
|
||||
function onResize(resizeData) {
|
||||
function onResize(resizeData: ResizeData) {
|
||||
action('resize', resizeData);
|
||||
newHeight.value = resizeData.height;
|
||||
newWidth.value = resizeData.width;
|
||||
Reference in New Issue
Block a user