storybook/docs/snippets/common/custom-docs-page.ts-component.ts.mdx
Ethan Mick 6d29300a5e
fix: Change deprecated React.VFC to React.FC
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.
2023-01-13 13:12:51 -05:00

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>
);
};
```