Skip to content

Commit

Permalink
docs(design-system): fix example usage of theme variable
Browse files Browse the repository at this point in the history
  • Loading branch information
iimog authored Feb 9, 2020
1 parent 422b523 commit 617b40d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/src/articles/design-system/use-theme-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ import { View } from 'react-native';
import { withStyles } from '@ui-kitten/components';

const AwesomeView = (props) => {
const { themedStyle, style, ...restProps } = this.props;
const { themedStyle, style, ...restProps } = props;

return (
<View {...restProps} style={[themedStyle, style]} />
<View {...restProps} style={[themedStyle.awesome, style]} />
);
};

export const ThemedAwesomeView = withStyles(AwesomeView, (theme) => ({
backgroundColor: theme['color-primary-500'],
awesome: {
backgroundColor: theme['color-primary-500'],
},
}));
```

Expand Down

0 comments on commit 617b40d

Please sign in to comment.