|
| 1 | +<p align="center"> |
| 2 | + <a href="//react-devui.com" rel="noopener" target="_blank"><img width="150" src="/packages/site/src/assets/logo.svg" alt="DevUI logo"></a> |
| 3 | +</p> |
| 4 | + |
1 | 5 | <h1 align="center">React DevUI</h1> |
2 | 6 |
|
3 | | -<p align="center">UI components based on React</p> |
| 7 | +<div align="center"> |
| 8 | + |
| 9 | +<!-- prettier-ignore-start --> |
| 10 | +[](https://www.npmjs.com/package/@react-devui/ui) |
| 11 | +[](https://bundlephobia.com/package/@react-devui/ui) |
| 12 | +[](https://github.com/DevCloudFE/react-devui/actions/workflows/main.yml) |
| 13 | +<!-- prettier-ignore-end --> |
| 14 | + |
| 15 | +</div> |
| 16 | + |
| 17 | +<div align="center"> |
4 | 18 |
|
5 | 19 | English | [简体中文](README.zh-CN.md) |
6 | 20 |
|
| 21 | +</div> |
| 22 | + |
| 23 | +## Installation |
| 24 | + |
| 25 | +```bash |
| 26 | +yarn add @react-devui/ui @react-devui/icons @react-devui/hooks @react-devui/utils |
| 27 | +``` |
| 28 | + |
| 29 | +## Getting Started |
| 30 | + |
| 31 | +```tsx |
| 32 | +import type { DRootProps } from '@react-devui/ui'; |
| 33 | + |
| 34 | +import { useMemo } from 'react'; |
| 35 | + |
| 36 | +import { DRoot } from '@react-devui/ui'; |
| 37 | + |
| 38 | +export default function App() { |
| 39 | + const rootContext = useMemo<DRootProps['context']>( |
| 40 | + () => ({ |
| 41 | + layout: { pageScrollEl: '#app-main', contentResizeEl: '#app-content' }, |
| 42 | + }), |
| 43 | + [] |
| 44 | + ); |
| 45 | + |
| 46 | + return ( |
| 47 | + <DRoot context={rootContext}> |
| 48 | + <main id="app-main" style={{ overflow: 'auto' }}> |
| 49 | + <section id="app-content" style={{ height: '200vh' }}> |
| 50 | + Some content... |
| 51 | + </section> |
| 52 | + </main> |
| 53 | + </DRoot> |
| 54 | + ); |
| 55 | +} |
| 56 | +``` |
| 57 | + |
| 58 | +## Links |
| 59 | + |
7 | 60 | - [react-devui.com](//react-devui.com) |
8 | 61 | - [admin.react-devui.com](//admin.react-devui.com) |
9 | 62 |
|
10 | | -Need unit test support (Jest) 🤝 |
| 63 | +## Contributing |
| 64 | + |
| 65 | +Please read our [contributing guide](/CONTRIBUTING.md) first. |
| 66 | + |
| 67 | +Need unit test support (Jest) 🤝. |
| 68 | + |
| 69 | +## License |
| 70 | + |
| 71 | +[](https://github.com/DevCloudFE/react-devui/actions/workflows/main.yml) |
0 commit comments