0.0.3 • Published 2 years ago

@ray-js/components-ty-theme-provider v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

English | 简体中文

@ray-js/components-ty-theme-provider

latest download

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>