feat(editor): Upgrade Storybook to 8.0 (no-changelog) (#8867)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-03-13 16:52:29 +01:00
committed by GitHub
parent 948c383999
commit 572af38383
32 changed files with 1826 additions and 3589 deletions

View File

@@ -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;