Skip to content

Commit

Permalink
improve button displayName
Browse files Browse the repository at this point in the history
  • Loading branch information
hengkx committed Apr 25, 2020
1 parent 2cffcd8 commit a275d49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/button/__tests__/__snapshots__/type.test.tsx.snap
Expand Up @@ -314,7 +314,7 @@ exports[`Button should not render as link button when href is undefined 1`] = `
`;

exports[`Button should render empty button without errors 1`] = `
<ForwardRef(InternalButton)
<Button
block={false}
ghost={false}
htmlType="button"
Expand Down Expand Up @@ -361,7 +361,7 @@ exports[`Button should render empty button without errors 1`] = `
</LoadingIcon>
</button>
</Wave>
</ForwardRef(InternalButton)>
</Button>
`;

exports[`Button should support link button 1`] = `
Expand Down
2 changes: 2 additions & 0 deletions components/button/button.tsx
Expand Up @@ -263,6 +263,8 @@ const InternalButton: React.ForwardRefRenderFunction<unknown, ButtonProps> = (pr

const Button = React.forwardRef<unknown, ButtonProps>(InternalButton) as CompoundedComponent;

Button.displayName = 'Button';

Button.defaultProps = {
loading: false,
ghost: false,
Expand Down

0 comments on commit a275d49

Please sign in to comment.