@ray-js/components-ty-config-provider
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

English | 简体中文

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

latest download

Config Provider.

Installation

$ npm install @ray-js/components-ty-config-provider
# or
$ yarn add @ray-js/components-ty-config-provider

Usage

import ConfigProvider, { useConfig } from '@ray-js/components-ty-config-provider';

const Button = () => {
  const config = useConfig();
  return <View style={{ background: config?.global?.background }}>Click</View>;
};

export default () => (
  <ConfigProvider config={{ global: { background: 'blue' } }}>
    <Button />
  </ConfigProvider>
);

Readme

Keywords

none

Package Sidebar

Install

npm i @ray-js/components-ty-config-provider

Weekly Downloads

112

Version

0.0.10

License

MIT

Unpacked Size

122 kB

Total Files

87

Last publish

Collaborators

  • tuyafe