This repository was archived by the owner on Feb 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export default class Icon extends Component {
66
77 static propTypes = {
88 name : PropTypes . string . isRequired ,
9- style : PropTypes . object ,
9+ style : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . array ] ) ,
1010 size : PropTypes . number ,
1111 color : PropTypes . string
1212 } ;
Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ export default class Toolbar extends Component {
4848 }
4949 } ;
5050
51+ const opacityMap = {
52+ light : .38 ,
53+ dark : .30
54+ } ;
55+
5156 const styleMap = {
5257 backgroundColor : overrides && overrides . backgroundColor ? getColor ( overrides . backgroundColor ) : themeMap [ theme ] . backgroundColor ,
5358 color : overrides && overrides . color ? getColor ( overrides . color ) : themeMap [ theme ] . color ,
@@ -88,11 +93,12 @@ export default class Toolbar extends Component {
8893 color = { styleMap . iconColor }
8994 badge = { action . badge }
9095 onPress = { action . onPress }
96+ disabled = { action . disabled }
9197 >
9298 < Icon name = { action . icon }
9399 size = { 24 }
94100 color = { styleMap . iconColor }
95- style = { styles . icon }
101+ style = { [ styles . icon , action . disabled ? { opacity : opacityMap [ theme ] } : null ] }
96102 />
97103 </ IconToggle >
98104 ) ;
@@ -105,6 +111,10 @@ export default class Toolbar extends Component {
105111
106112const styles = {
107113 toolbar : {
114+ position : 'absolute' ,
115+ top : 0 ,
116+ left : 0 ,
117+ right : 0 ,
108118 height : 56 ,
109119 flexDirection : 'row' ,
110120 alignItems : 'center'
You can’t perform that action at this time.
0 commit comments