File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,12 @@ import { css, jsx } from '@emotion/react';
5
5
6
6
import styles from './styles' ;
7
7
8
- export const Button = React . forwardRef (
9
- ( props : Record < string , any > , ref : React . ForwardedRef < HTMLButtonElement > ) => {
10
- return < button type = "button" ref = { ref } { ...props } css = { styles } /> ;
8
+ type ButtonProps = {
9
+ margin : string ;
10
+ } & Record < string , any > ;
11
+
12
+ export const Button : React . FC < ButtonProps > = React . forwardRef (
13
+ ( { margin, ...props } : ButtonProps , ref : React . ForwardedRef < HTMLButtonElement > ) => {
14
+ return < button type = "button" ref = { ref } { ...props } css = { styles ( { margin } ) } /> ;
11
15
} ,
12
16
) ;
Original file line number Diff line number Diff line change 2
2
/** @jsx jsx */
3
3
import { css , jsx } from '@emotion/react' ;
4
4
5
- export default css `
5
+ export default ( { margin } : { margin : string } ) => css `
6
6
display : flex;
7
7
align-items : center;
8
8
@@ -31,6 +31,14 @@ export default css`
31
31
justify-content : center;
32
32
}
33
33
34
+ & .prefix {
35
+ margin-right : ${ margin } ;
36
+ }
37
+
38
+ & .suffix {
39
+ margin-left : ${ margin } ;
40
+ }
41
+
34
42
div {
35
43
text-align : left;
36
44
overflow : hidden;
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export const CellTree: React.FC<CellTreeProps> = ({
91
91
margin = { icon ? mergedTreeIconOptions . margin : mergedTreeIconOptions . noIconMargin }
92
92
onClick = { handleClick }
93
93
>
94
- { icon ? < span > { icon } </ span > : < span /> }
94
+ { icon ? < div > { icon } </ div > : < div /> }
95
95
</ Button >
96
96
< div > { children } </ div >
97
97
</ div >
You can’t perform that action at this time.
0 commit comments