Updated deprecated types in collabration and features stories.

This commit is contained in:
Juan Lago 2023-08-24 09:20:37 +02:00 committed by tato
parent 674aac7023
commit 097c2a4e90
2 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import React, {
useRef,
useMemo,
} from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";
import { Sheet, Op, Selection, colors } from "@fortune-sheet/core";
import { Workbook, WorkbookInstance } from "@fortune-sheet/react";
import { v4 as uuidv4 } from "uuid";
@ -13,9 +13,9 @@ import { hashCode } from "./utils";
export default {
component: Workbook,
} as ComponentMeta<typeof Workbook>;
} as Meta<typeof Workbook>;
const Template: ComponentStory<typeof Workbook> = ({ ...args }) => {
const Template: StoryFn<typeof Workbook> = ({ ...args }) => {
const [data, setData] = useState<Sheet[]>();
const [error, setError] = useState(false);
const wsRef = useRef<WebSocket>();

View File

@ -1,5 +1,5 @@
import React, { useState, useCallback } from "react";
import { ComponentMeta, ComponentStory } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";
import { Sheet } from "@fortune-sheet/core";
import { Workbook } from "@fortune-sheet/react";
import cell from "./data/cell";
@ -11,9 +11,9 @@ import lockcellData from "./data/protected";
export default {
component: Workbook,
} as ComponentMeta<typeof Workbook>;
} as Meta<typeof Workbook>;
const Template: ComponentStory<typeof Workbook> = ({
const Template: StoryFn<typeof Workbook> = ({
// eslint-disable-next-line react/prop-types
data: data0,
...args
@ -58,7 +58,7 @@ ProtectedSheet.args = {
data: lockcellData,
};
export const MultiInstance: ComponentStory<typeof Workbook> = () => {
export const MultiInstance: StoryFn<typeof Workbook> = () => {
return (
<div
style={{