Skip to content

Commit 1ec192d

Browse files
committed
docs: update README
1 parent 1b21527 commit 1ec192d

7 files changed

Lines changed: 131 additions & 11 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Consider the following guidelines:
2525
- Make your changes in a new git branch:
2626

2727
```shell
28-
git checkout -b issue-N/A main
28+
git switch -c issue-N/A
2929
```
3030

3131
- Create your patch, **including appropriate test cases**.
@@ -77,12 +77,10 @@ Must be one of the following:
7777

7878
- **empty**: Does not provide scope
7979
- **module**: Such as **site**
80-
- **module:\***: Such as **ui:button**
8180

8281
Real world examples can look like this:
8382

8483
```shell
8584
chore: update dependencies
8685
feat(site): support themes
87-
fix(ui:button): fix `onClick` no response
8886
```

README.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,71 @@
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+
15
<h1 align="center">React DevUI</h1>
26

3-
<p align="center">UI components based on React</p>
7+
<div align="center">
8+
9+
<!-- prettier-ignore-start -->
10+
[![npm latest package](http://img.shields.io/npm/v/@react-devui/ui/latest.svg?style=flat-square)](https://www.npmjs.com/package/@react-devui/ui)
11+
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/@react-devui/ui?style=flat-square)](https://bundlephobia.com/package/@react-devui/ui)
12+
[![gitHub workflow status](https://img.shields.io/github/workflow/status/DevCloudFE/react-devui/Main?style=flat-square)](https://github.com/DevCloudFE/react-devui/actions/workflows/main.yml)
13+
<!-- prettier-ignore-end -->
14+
15+
</div>
16+
17+
<div align="center">
418

519
English | [简体中文](README.zh-CN.md)
620

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+
760
- [react-devui.com](//react-devui.com)
861
- [admin.react-devui.com](//admin.react-devui.com)
962

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+
[![gitHub license](https://img.shields.io/github/license/DevCloudFE/react-devui?style=flat-square)](https://github.com/DevCloudFE/react-devui/actions/workflows/main.yml)

README.zh-CN.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,71 @@
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+
15
<h1 align="center">React DevUI</h1>
26

3-
<p align="center">基于 React 的 UI 组件库</p>
7+
<div align="center">
8+
9+
<!-- prettier-ignore-start -->
10+
[![npm latest package](http://img.shields.io/npm/v/@react-devui/ui/latest.svg?style=flat-square)](https://www.npmjs.com/package/@react-devui/ui)
11+
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/@react-devui/ui?style=flat-square)](https://bundlephobia.com/package/@react-devui/ui)
12+
[![gitHub workflow status](https://img.shields.io/github/workflow/status/DevCloudFE/react-devui/Main?style=flat-square)](https://github.com/DevCloudFE/react-devui/actions/workflows/main.yml)
13+
<!-- prettier-ignore-end -->
14+
15+
</div>
16+
17+
<div align="center">
418

519
[English](README.md) | 简体中文
620

21+
</div>
22+
23+
## 安装
24+
25+
```bash
26+
yarn add @react-devui/ui @react-devui/icons @react-devui/hooks @react-devui/utils
27+
```
28+
29+
## 快速开始
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+
## 链接
59+
760
- [react-devui.com](//react-devui.com)
861
- [admin.react-devui.com](//admin.react-devui.com)
962

10-
需要单元测试支持(Jest)🤝
63+
## 贡献
64+
65+
请先阅读我们的[贡献指南](/CONTRIBUTING.md)
66+
67+
需要单元测试支持(Jest) 🤝。
68+
69+
## 授权协议
70+
71+
[![gitHub license](https://img.shields.io/github/license/DevCloudFE/react-devui?style=flat-square)](https://github.com/DevCloudFE/react-devui/actions/workflows/main.yml)

packages/hooks/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"glob": "README.md",
24-
"input": "packages/hooks",
24+
"input": "",
2525
"output": "/"
2626
},
2727
{

packages/icons/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"glob": "README.md",
24-
"input": "packages/icons",
24+
"input": "",
2525
"output": "/"
2626
},
2727
{

packages/ui/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"glob": "README.md",
29-
"input": "packages/ui",
29+
"input": "",
3030
"output": "/"
3131
},
3232
{

packages/utils/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"glob": "README.md",
24-
"input": "packages/utils",
24+
"input": "",
2525
"output": "/"
2626
},
2727
{

0 commit comments

Comments
 (0)