mirror of
https://github.com/ruilisi/fortune-sheet.git
synced 2025-01-07 03:16:50 +08:00
Updated deprecated types in collabration and features stories.
This commit is contained in:
parent
674aac7023
commit
097c2a4e90
@ -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>();
|
||||
|
@ -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={{
|
||||
|
Loading…
Reference in New Issue
Block a user