#
With StylewithStyle
is a high order function. You need to give your component as a parameter. You do not need to use StyleSheet again for the style function you will create. withStyle
does this for you
note
The styles function you created takes other fields as parameters, such as the color and fonts you pass in the theme.
#
Component PropsTakes 5 props wrapped with withStyle.
styles
| object#
return the styles you created for the components
currentTheme
| object#
return the current theme if you want to do the styling directly in the component and not via styles
themeTypes
| array#
Returns the key of the all themes.
themeType
| string#
Returns the key of the current theme.
toggleTheme
| function#
Function that allows you to change the theme. It takes the key of the new theme as a parameter.