File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2+ import PropTypes from 'prop-types' ;
23import styled from 'styled-components' ;
3- import { prop , remSize } from '../../theme ' ;
4+ import Button from '../../common/Button ' ;
45
5- const textColor = prop ( 'primaryTextColor' ) ;
6-
7- const IconButton = styled . button `
6+ const ButtonWrapper = styled ( Button ) `
87width: 3rem;
98> svg {
109 width: 100%;
1110 height: auto;
12- fill: ${ textColor } ;
13- stroke: ${ textColor } ;
1411}
1512` ;
1613
14+ const IconButton = ( { children } ) => ( < ButtonWrapper
15+ aria-label = "Add to collection"
16+ iconBefore = { children }
17+ kind = { Button . kinds . inline }
18+ /> ) ;
19+
20+ IconButton . propTypes = {
21+ children : PropTypes . element . isRequired
22+ } ;
23+
1724export default IconButton ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ const IDEViewMobile = (props) => {
6161 < h3 > { selectedFile . name } </ h3 >
6262 </ div >
6363
64- < div style = { { marginLeft : '2rem' } } >
64+ < div style = { { marginLeft : '2rem' , display : 'flex' } } >
6565 < IconButton onClick = { ( ) => setOverlay ( 'preferences' ) } >
6666 < PreferencesIcon focusable = "false" aria-hidden = "true" />
6767 </ IconButton >
You can’t perform that action at this time.
0 commit comments