Skip to content

Commit 617b40d

Browse files
authored
docs(design-system): fix example usage of theme variable
1 parent 422b523 commit 617b40d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/src/articles/design-system/use-theme-variables.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ import { View } from 'react-native';
1414
import { withStyles } from '@ui-kitten/components';
1515

1616
const AwesomeView = (props) => {
17-
const { themedStyle, style, ...restProps } = this.props;
17+
const { themedStyle, style, ...restProps } = props;
1818

1919
return (
20-
<View {...restProps} style={[themedStyle, style]} />
20+
<View {...restProps} style={[themedStyle.awesome, style]} />
2121
);
2222
};
2323

2424
export const ThemedAwesomeView = withStyles(AwesomeView, (theme) => ({
25-
backgroundColor: theme['color-primary-500'],
25+
awesome: {
26+
backgroundColor: theme['color-primary-500'],
27+
},
2628
}));
2729
```
2830

0 commit comments

Comments
 (0)