Skip to content

Commit f95ae27

Browse files
committed
feat: change docs
1 parent 845de3f commit f95ae27

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ask Design for React Native Docs
2+
3+
This is the repository for the Ask Design for React Native documentation.
4+
5+
# Installation
6+
7+
```bash
8+
bun add @ask-design/react-native
9+
```
10+
11+
# Usage

docs/cn/guide/components/button.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Button 按钮
2+
3+
点击后会触发一个操作
4+
5+
## 何时使用
6+
7+
标记一个或封装一组操作命令,响应用户点击行为,触发相应的业务逻辑。
8+
9+
## 示例
10+
11+
```tsx
12+
import { Button, Spance } from '@ask-design/react-native';
13+
14+
export default function Root() {
15+
return (
16+
<Space wrap>
17+
<Button color="primary" fill="solid">
18+
Solid
19+
</Button>
20+
<Button color="primary" fill="outline">
21+
Outline
22+
</Button>
23+
<Button color="primary" fill="none">
24+
None
25+
</Button>
26+
</Space>
27+
)
28+
}
29+
```
30+
31+
## 属性
32+
33+
<table>
34+
<thead>
35+
<tr>
36+
</tr>
37+
</thead>
38+
39+
</table>
40+
41+
| 属性 | 说明 | 类型 | 默认值 |
42+
|------------------|--------------------------------------------------------------------------------|--------------------------------|-------------|
43+
| `type` | 按钮类型,可选值为 `primary` / `ghost` / `warning` 或不设 | string | - |
44+
| `size` | 按钮大小,可选值为 `large` / `small` | string | `large` |
45+
| `activeStyle` | 点击反馈的自定义样式(设为 `false` 时表示禁止点击反馈) | `{}` / `false` | `{}` |
46+
| `activeClassName`| 点击反馈的自定义类名 | string | - |
47+
| `disabled` | 设置禁用 | boolean | `false` |
48+
| `onPress` | 点击按钮时的回调函数 | `(e: Object) => void` ||
49+
| `style` | 自定义样式 | `Object` ||
50+
| `styles` | 语义化结构样式 | `ButtonStyles` | - |
51+
| `onPressIn` | 同 React Native `Pressable``onPressIn` | `(e: Object) => void` ||
52+
| `onPressOut` | 同 React Native `Pressable``onPressOut` | `(e: Object) => void` ||
53+
| `onShowUnderlay` | 同 React Native `Pressable``onPressIn`,仅在 `activeStyle` 不为 `false` 时触发 | `(e: Object) => void` ||
54+
| `onHideUnderlay` | 同 React Native `Pressable``onPressOut`,仅在 `activeStyle` 不为 `false` 时触发 | `(e: Object) => void` ||

docs/cn/guide/components/icoon.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Icon 图标

0 commit comments

Comments
 (0)