File tree Expand file tree Collapse file tree 1 file changed +26
-19
lines changed
src/components/BottomNavigationAction Expand file tree Collapse file tree 1 file changed +26
-19
lines changed Original file line number Diff line number Diff line change 1
1
import { BottomNavigationActionProps , DynamicIcon } from '@bluebase/components' ;
2
+
2
3
import MuiBottomNavigationAction from '@material-ui/core/BottomNavigationAction' ;
3
4
import React from 'react' ;
5
+ import { StyleSheet } from 'react-native' ;
4
6
import { componentMapper } from '@bluebase/component-mapper' ;
5
7
6
- export const BottomNavigationAction = componentMapper < BottomNavigationActionProps > ( MuiBottomNavigationAction , {
7
- icon : ( { icon } ) => {
8
+ export const BottomNavigationAction = componentMapper < BottomNavigationActionProps > (
9
+ MuiBottomNavigationAction ,
10
+ {
11
+ icon : ( { icon } ) => {
12
+ if ( ! icon ) {
13
+ return ;
14
+ }
8
15
9
- if ( ! icon ) {
10
- return ;
11
- }
16
+ const size = icon . size || 24 ;
12
17
13
- const size = icon . size || 24 ;
18
+ const props = {
19
+ size,
20
+ style : {
21
+ // lineHeight: size,
22
+ ...icon . style ,
23
+ } ,
24
+ ...icon ,
25
+ } ;
14
26
15
- const props = {
16
- size,
17
- style : {
18
- lineHeight : size ,
19
- ...icon . style ,
20
- } ,
21
- ...icon ,
22
- } ;
27
+ return React . createElement ( DynamicIcon , props ) ;
28
+ } ,
23
29
24
- return React . createElement ( DynamicIcon , props ) ;
25
- }
26
- } , {
27
- rest : true
28
- } ) ;
30
+ style : ( { style } : any ) => StyleSheet . flatten ( style ) ,
29
31
32
+ label : 'label' ,
33
+ showLabel : 'showLabel' ,
34
+ value : 'value' ,
35
+ }
36
+ ) ;
You can’t perform that action at this time.
0 commit comments