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';
55
66import styles from './styles' ;
77
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 } ) } /> ;
1115 } ,
1216) ;
Original file line number Diff line number Diff line change 22/** @jsx jsx */
33import { css , jsx } from '@emotion/react' ;
44
5- export default css `
5+ export default ( { margin } : { margin : string } ) => css `
66 display : flex;
77 align-items : center;
88
@@ -31,6 +31,14 @@ export default css`
3131 justify-content : center;
3232 }
3333
34+ & .prefix {
35+ margin-right : ${ margin } ;
36+ }
37+
38+ & .suffix {
39+ margin-left : ${ margin } ;
40+ }
41+
3442 div {
3543 text-align : left;
3644 overflow : hidden;
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export const CellTree: React.FC<CellTreeProps> = ({
9191 margin = { icon ? mergedTreeIconOptions . margin : mergedTreeIconOptions . noIconMargin }
9292 onClick = { handleClick }
9393 >
94- { icon ? < span > { icon } </ span > : < span /> }
94+ { icon ? < div > { icon } </ div > : < div /> }
9595 </ Button >
9696 < div > { children } </ div >
9797 </ div >
You can’t perform that action at this time.
0 commit comments