Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ant-design/antd-token-previewer
https://github.com/ant-design/antd-token-previewer
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ant-design/antd-token-previewer
- Owner: ant-design
- License: mit
- Created: 2022-05-13T06:54:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-18T09:50:32.000Z (10 months ago)
- Last Synced: 2024-12-23T15:14:57.868Z (10 days ago)
- Language: TypeScript
- Homepage: https://ant-design.github.io/antd-token-previewer
- Size: 42.4 MB
- Stars: 74
- Watchers: 5
- Forks: 22
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# antd-token-previewer 🖥
Help you customize theme in Ant Design.
![image](https://user-images.githubusercontent.com/27722486/235037764-54068c36-13de-4c06-9c7d-78b9a5475c28.png)
## Live Demo
https://ant-design.github.io/antd-token-previewer/
## Install
```
npm i antd-token-previewer
```## Usage
Ref: https://ant-design.github.io/antd-token-previewer/editor
## API
### ThemeEditor
| Property | Description | Type | Default |
| ---------------- | ---------------------------------------- | ------------------------------ | ------- |
| theme | Controlled Theme object | `Theme` | - |
| onThemeChange | Callback when `theme` changed | `(theme: Theme) => void` | - |
| locale | Language used in ThemeEditor | `Locale` | `zhCN` |
| actions | Actions displayed on the right of header | `React.ReactNode` | - |
| advanced | Advance mode | `boolean` | - |
| onAdvancedChange | Callback when `advanced` change | `(advanced: booleaen) => void` | - |
| children | Preview area. | `ReactNode` | - |### Theme
| Property | Description | Type |
| -------- | ------------------------------ | ------------- |
| name | Name of Theme | `string` |
| key | Used as `key` for ReactElement | `string` |
| config | Theme config of antd | `ThemeConfig` |## Development
```
npm install
npm start
```## License
antd-token-previewer is released under the MIT license.