Skip to content

Commit 7e127bf

Browse files
committed
fix(SortButton): make TS happy
1 parent 0e21122 commit 7e127bf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/common/components/Button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { css, jsx } from '@emotion/react';
66
import styles from './styles';
77

88
type ButtonProps = {
9-
margin: string;
9+
margin?: string;
1010
} & Record<string, any>;
1111

1212
export const Button: React.FC<ButtonProps> = React.forwardRef(

src/common/components/Button/styles.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/** @jsx jsx */
33
import { css, jsx } from '@emotion/react';
44

5-
export default ({ margin }: { margin: string }) => css`
5+
export default ({ margin }: { margin?: string }) => css`
66
display: flex;
77
align-items: center;
88
@@ -32,11 +32,11 @@ export default ({ margin }: { margin: string }) => css`
3232
}
3333
3434
&.prefix {
35-
margin-right: ${margin};
35+
margin-right: ${margin || 0};
3636
}
3737
3838
&.suffix {
39-
margin-left: ${margin};
39+
margin-left: ${margin || 0};
4040
}
4141
4242
div {

0 commit comments

Comments
 (0)