We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bd22c0 commit fb03f31Copy full SHA for fb03f31
packages/gatsby-theme/src/components/CustomButton.tsx
@@ -3,10 +3,9 @@ import { ButtonProps } from './shared/base.d';
3
import { Flex, Image, Button } from './shared/base';
4
5
export const CustomButton: React.FunctionComponent<
6
- CustomButtonProps,
7
- { type?: 'github' | 'tutorial' | 'spectrum' | 'default' }
8
-> = ({ type, children, ...buttonProps }) => {
9
- const { icon, bg } = customButtonTypes[type] || customButtonTypes.default;
+ ButtonProps & { type?: 'github' | 'tutorial' | 'spectrum' | 'default' }
+> = ({ type = 'default', children, ...buttonProps }) => {
+ const { icon, bg } = customButtonTypes[type];
10
11
if (!type) {
12
return <Button {...buttonProps}>{children}</Button>;
0 commit comments