Skip to content

Commit

Permalink
Merge pull request #13276 from selrond/patch-1
Browse files Browse the repository at this point in the history
Update deprecated type
  • Loading branch information
shilman committed Dec 1, 2020
2 parents 94052ae + 151fb57 commit bd835c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Expand Up @@ -4,15 +4,15 @@ export interface ElemAProps {
size?: 'a' | 'b' | 'c' | 'd';
}

export const Header: React.SFC<ElemAProps> = ({ size = 'a', children }) => (
export const Header: React.FC<ElemAProps> = ({ size = 'a', children }) => (
<div className={size}>{children}</div>
);

export interface ElemBProps {
size?: 'sm' | 'md' | 'lg';
}

export const Paragraph: React.SFC<ElemBProps> = ({ size, children }) => (
export const Paragraph: React.FC<ElemBProps> = ({ size, children }) => (
<div className={size}>{children}</div>
);

Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/react/button-story-rename-story.ts.mdx
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Button, ButtonProps } from './Button';

export const Primary: React.SFC<{}> = () => <Button primary>Button</Button>;
export const Primary: React.VFC<{}> = () => <Button primary>Button</Button>;

Primary.storyName='I am the primary';
```
```
6 changes: 3 additions & 3 deletions docs/snippets/react/button-story-with-emojis.ts.mdx
@@ -1,8 +1,8 @@
```ts
// Button.stories.tsx

export const Primary: React.SFC<{}> = () => <Button background="#ff0" label="Button" />;
export const Secondary : React.SFC<{}> = () => <Button background="#ff0" label="😄👍😍💯" />;
export const Tertiary: React.SFC<{}> = () => <Button background="#ff0" label="📚📕📈🤓" />;
export const Primary: React.VFC<{}> = () => <Button background="#ff0" label="Button" />;
export const Secondary: React.VFC<{}> = () => <Button background="#ff0" label="😄👍😍💯" />;
export const Tertiary: React.VFC<{}> = () => <Button background="#ff0" label="📚📕📈🤓" />;

```
2 changes: 1 addition & 1 deletion docs/snippets/react/button-story.ts.mdx
Expand Up @@ -4,5 +4,5 @@
import React from 'react';
import { Button } from './Button';

export const Primary: React.SFC<{}> = () => <Button primary>Button</Button>;
export const Primary: React.VFC<{}> = () => <Button primary>Button</Button>;
```

0 comments on commit bd835c1

Please sign in to comment.