File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,35 @@ export const Sizes = () => (
4343 </ >
4444) ;
4545
46+ export const ContainsSVG = ( ) => (
47+ < >
48+ < Button appearance = "secondary" >
49+ < Icon icon = "lock" />
50+ Default
51+ </ Button >
52+ < Button appearance = "secondary" size = "small" >
53+ < Icon icon = "lock" />
54+ Small
55+ </ Button >
56+ < Button appearance = "secondary" >
57+ < Icon icon = "check" />
58+ Default
59+ </ Button >
60+ < Button appearance = "secondary" size = "small" >
61+ < Icon icon = "check" />
62+ Small
63+ </ Button >
64+ < Button appearance = "secondary" >
65+ < Icon icon = "grid" />
66+ Default
67+ </ Button >
68+ < Button appearance = "secondary" size = "small" >
69+ < Icon icon = "grid" />
70+ Small
71+ </ Button >
72+ </ >
73+ ) ;
74+
4675export const Loading = ( ) => (
4776 < >
4877 < Button appearance = "primary" isLoading >
Original file line number Diff line number Diff line change @@ -88,12 +88,12 @@ export const StyledButton = styled.button<StylingProps & { children: ReactElemen
8888 }
8989
9090 svg {
91- height: ${ ( props ) => ( props . size === SIZES . SMALL ? '14 ' : '16 ' ) } px;
92- width: ${ ( props ) => ( props . size === SIZES . SMALL ? '14 ' : '16 ' ) } px;
91+ height: ${ ( props ) => ( props . size === SIZES . SMALL ? '12 ' : '14 ' ) } px;
92+ width: ${ ( props ) => ( props . size === SIZES . SMALL ? '12 ' : '14 ' ) } px;
9393 vertical-align: top;
9494 margin-right: ${ ( props ) => ( props . size === SIZES . SMALL ? '4' : '6' ) } px;
95- margin-top: ${ ( props ) => ( props . size === SIZES . SMALL ? '-1 ' : '-2 ' ) } px;
96- margin-bottom: ${ ( props ) => ( props . size === SIZES . SMALL ? '-1 ' : '-2 ' ) } px;
95+ margin-top: ${ ( props ) => ( props . size === SIZES . SMALL ? '0 ' : '-1 ' ) } px;
96+ margin-bottom: ${ ( props ) => ( props . size === SIZES . SMALL ? '0 ' : '-1 ' ) } px;
9797
9898 /* Necessary for js mouse events to not glitch out when hovering on svgs */
9999 pointer-events: none;
@@ -147,6 +147,8 @@ export const StyledButton = styled.button<StylingProps & { children: ReactElemen
147147 svg {
148148 display: block;
149149 margin: 0;
150+ height: ${ props . size === SIZES . SMALL ? '14' : '16' } px;
151+ width: ${ props . size === SIZES . SMALL ? '14' : '16' } px;
150152 }
151153 padding: ${ props . size === SIZES . SMALL ? '7' : '12' } px;
152154 ` }
You can’t perform that action at this time.
0 commit comments