English | 简体中文
@ray-js/components-ty-theme-provider
Theme Config Provider.
Installation
$ npm install @ray-js/components-ty-theme-provider
# or
$ yarn add @ray-js/components-ty-theme-provider
Usage
import Theme, { useTheme } from '@ray-js/components-ty-theme-provider';
const Button = () => {
const theme = useTheme()
return <View style={{ background: theme?.global?.background }}>Click</View>
}
export default () => <Theme theme={{ background: 'blue' }}>
<Button />
</Theme>