English | [简体中文](./README-zh_CN.md)

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

[![latest](https://img.shields.io/npm/v/@ray-js/components-ty-config-provider/latest.svg)](https://www.npmjs.com/package/@ray-js/components-ty-config-provider) [![download](https://img.shields.io/npm/dt/@ray-js/components-ty-config-provider.svg)](https://www.npmjs.com/package/@ray-js/components-ty-config-provider)

> Config Provider.

## Installation

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

## Usage

```tsx
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>
);
```