mirror of
https://github.com/ruilisi/fortune-sheet.git
synced 2025-01-09 04:07:33 +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,
|
useRef,
|
||||||
useMemo,
|
useMemo,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
import { Meta, StoryFn } from "@storybook/react";
|
||||||
import { Sheet, Op, Selection, colors } from "@fortune-sheet/core";
|
import { Sheet, Op, Selection, colors } from "@fortune-sheet/core";
|
||||||
import { Workbook, WorkbookInstance } from "@fortune-sheet/react";
|
import { Workbook, WorkbookInstance } from "@fortune-sheet/react";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
@ -13,9 +13,9 @@ import { hashCode } from "./utils";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
component: Workbook,
|
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 [data, setData] = useState<Sheet[]>();
|
||||||
const [error, setError] = useState(false);
|
const [error, setError] = useState(false);
|
||||||
const wsRef = useRef<WebSocket>();
|
const wsRef = useRef<WebSocket>();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { useState, useCallback } from "react";
|
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 { Sheet } from "@fortune-sheet/core";
|
||||||
import { Workbook } from "@fortune-sheet/react";
|
import { Workbook } from "@fortune-sheet/react";
|
||||||
import cell from "./data/cell";
|
import cell from "./data/cell";
|
||||||
@ -11,9 +11,9 @@ import lockcellData from "./data/protected";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
component: Workbook,
|
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
|
// eslint-disable-next-line react/prop-types
|
||||||
data: data0,
|
data: data0,
|
||||||
...args
|
...args
|
||||||
@ -58,7 +58,7 @@ ProtectedSheet.args = {
|
|||||||
data: lockcellData,
|
data: lockcellData,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MultiInstance: ComponentStory<typeof Workbook> = () => {
|
export const MultiInstance: StoryFn<typeof Workbook> = () => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
Loading…
Reference in New Issue
Block a user