mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
The type `VFC` (VoidFunctionComponent) is deprecated and is equivalent to `FC` (FunctionalComponent). https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L531 This commit updates the generated files from an installation to use the non-deprecated React type.
16 lines
372 B
Plaintext
16 lines
372 B
Plaintext
```ts
|
|
// CustomDocumentationComponent.ts|tsx
|
|
|
|
export const CustomDocumentationComponent: React.FC = () => {
|
|
return (
|
|
<div>
|
|
<h1>Replacing DocsPage with a custom component</h1>
|
|
<p>
|
|
The Docs page can be customized with your own custom content written as a React Component.
|
|
</p>
|
|
<p>Write your own code here👇</p>
|
|
</div>
|
|
);
|
|
};
|
|
```
|