File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
12import styled from '@emotion/styled' ;
23
34import colors from './colors' ;
@@ -7,7 +8,16 @@ export const paraGraphDefaultStyle = {
78 lineHeight : '20px' ,
89} ;
910
10- const Button = styled . button < { hideBackground ?: boolean } > `
11+ interface ButtonBaseProps
12+ extends React . ButtonHTMLAttributes < HTMLButtonElement > {
13+ type ?: React . ButtonHTMLAttributes < HTMLButtonElement > [ 'type' ] ;
14+ }
15+
16+ const ButtonBase = ( { type = 'button' , ...props } : ButtonBaseProps ) => {
17+ return < ButtonBase type = { type } { ...props } /> ;
18+ } ;
19+
20+ const Button = styled ( ButtonBase ) < { hideBackground ?: boolean } > `
1121 appearance: none;
1222 margin: 0;
1323 border: 0;
@@ -23,8 +33,6 @@ const Button = styled.button<{ hideBackground?: boolean }>`
2333 }
2434` ;
2535
26- Button . defaultProps = { type : 'button' } ;
27-
2836const CircleButton = styled ( Button ) `
2937 font-size: 14px;
3038 font-weight: bold;
You can’t perform that action at this time.
0 commit comments