File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 ` | 无 |
Original file line number Diff line number Diff line change 1+ # Icon 图标
You can’t perform that action at this time.
0 commit comments