11import React from 'react' ;
22import PropTypes from 'prop-types' ;
33import styled from 'styled-components' ;
4- import { remSize } from '../../theme' ;
4+ import { remSize , prop } from '../../theme' ;
55import IconButton from './IconButton' ;
66
77const BottomBarContent = styled . div `
8+ padding: ${ remSize ( 8 ) } ;
89 display: grid;
910 grid-template-columns: repeat(8,1fr);
10- padding: ${ remSize ( 8 ) } ;
11-
11+
1212 svg {
1313 max-height: ${ remSize ( 32 ) } ;
1414 }
15+
16+ path { fill: ${ prop ( 'primaryTextColor' ) } !important }
17+
18+ .inverted {
19+ path { fill: ${ prop ( 'backgroundColor' ) } !important }
20+ rect { fill: ${ prop ( 'primaryTextColor' ) } !important }
21+ }
1522` ;
1623
1724const ActionStrip = ( { actions } ) => (
1825 < BottomBarContent >
19- { actions . map ( ( { icon, aria, action } ) =>
26+ { actions . map ( ( {
27+ icon, aria, action, inverted
28+ } ) =>
2029 ( < IconButton
30+ inverted = { inverted }
31+ className = { inverted && 'inverted' }
2132 icon = { icon }
2233 aria-label = { aria }
2334 key = { `bottom-bar-${ aria } ` }
@@ -29,7 +40,8 @@ ActionStrip.propTypes = {
2940 actions : PropTypes . arrayOf ( PropTypes . shape ( {
3041 icon : PropTypes . element . isRequired ,
3142 aria : PropTypes . string . isRequired ,
32- action : PropTypes . func . isRequired
43+ action : PropTypes . func . isRequired ,
44+ inverted : PropTypes . bool
3345 } ) ) . isRequired
3446} ;
3547
0 commit comments