File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ const DefaultComponent: React.FC = () => {
100100}
101101
102102const ComponentWithUseCreateStyles: React .FC = () => {
103- const styles = useCreateStyles (({ colors }) => {
103+ const [ styles, theme] = useCreateStyles (({ colors }) => {
104104 text : {
105105 color : colors .primary ,
106106 backgroundColor : colors .accent
@@ -109,6 +109,7 @@ const ComponentWithUseCreateStyles: React.FC = () => {
109109 return (
110110 <View style = { { flex: 1 , justifyContent: ' center' , alignItems: ' center' }} >
111111 <Text style = { styles .text } >Hello World</Text >
112+ <Text style = { { color: theme .colors .accent }} >Hello World 2</Text >
112113 </View >
113114 )
114115}
@@ -137,6 +138,8 @@ const App: React.FC = () => (
137138 <ComponentWithUseCreateStyles />
138139 </ThemeProvider >
139140)
141+
142+ export default App
140143` ` `
141144## Storybook Addon
142145
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-themed-stylesheet" ,
3- "version" : " 0.3.0 " ,
3+ "version" : " 0.3.1 " ,
44 "description" : " React Native StyleSheets with Theming Support" ,
55 "author" : " Andre Pedroza" ,
66 "license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments