belong-ui-lib 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# belong-ui-lib
|
|
2
|
+
|
|
3
|
+
一个简单而实用的React UI组件库。
|
|
4
|
+
|
|
5
|
+
## 简介
|
|
6
|
+
|
|
7
|
+
belong-ui-lib 是一个轻量级的React UI组件库,旨在提供常用的UI组件,帮助开发者快速构建用户界面。
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
使用npm安装:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install belong-ui-lib
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
或使用yarn安装:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
yarn add belong-ui-lib
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 使用方法
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
import React from 'react';
|
|
27
|
+
import { Button } from 'belong-ui-lib';
|
|
28
|
+
|
|
29
|
+
function App() {
|
|
30
|
+
return (
|
|
31
|
+
<div>
|
|
32
|
+
<Button text="点击我" onClick={() => console.log('按钮被点击了')} />
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default App;
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## 组件列表
|
|
41
|
+
|
|
42
|
+
### Button
|
|
43
|
+
|
|
44
|
+
基础按钮组件。
|
|
45
|
+
|
|
46
|
+
#### 属性
|
|
47
|
+
|
|
48
|
+
| 属性 | 类型 | 说明 | 必需 |
|
|
49
|
+
|------|------|------|------|
|
|
50
|
+
| text | string | 按钮显示的文本 | 是 |
|
|
51
|
+
| onClick | () => void | 按钮点击事件处理函数 | 否 |
|
|
52
|
+
|
|
53
|
+
## 开发
|
|
54
|
+
|
|
55
|
+
### 克隆项目
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git clone <repository-url>
|
|
59
|
+
cd belong-ui-lib
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 安装依赖
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm install
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 构建
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm run build
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 依赖
|
|
75
|
+
|
|
76
|
+
- React (>=16)
|
|
77
|
+
- React DOM (>=16)
|
|
78
|
+
|
|
79
|
+
## 许可证
|
|
80
|
+
|
|
81
|
+
MIT
|