-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
executable file
·118 lines (115 loc) · 3.54 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import React from "react";
import { List } from "antd-mobile";
const Item = List.Item;
const Brief = Item.Brief;
const App: React.SFC = () => {
const [disabled, setDisabled] = React.useState(false);
return (
<>
<List renderHeader={"Basic Style"} className="my-list">
<Item extra={"extra content"}>Title</Item>
</List>
<List renderHeader={"Subtitle"} className="my-list">
<Item arrow="horizontal" multipleLine onClick={() => {}}>
Title <Brief>subtitle</Brief>
</Item>
<Item
arrow="horizontal"
multipleLine
onClick={() => {}}
platform="android"
>
ListItem (Android)
<Brief>
There may have water ripple effect of <br /> material if you set the
click event.
</Brief>
</Item>
<Item
arrow="horizontal"
thumb="https://zos.alipayobjects.com/rmsportal/dNuvNrtqUztHCwM.png"
multipleLine
onClick={() => {}}
>
Title <Brief>subtitle</Brief>
</Item>
</List>
<List
renderHeader={"Customized Right Side(Empty Content / Text / Image)"}
className="my-list"
>
<Item>Title</Item>
<Item arrow="horizontal" onClick={() => {}}>
Title
</Item>
<Item extra="extra content" arrow="horizontal" onClick={() => {}}>
Title
</Item>
<Item
extra="10:30"
align="top"
thumb="https://zos.alipayobjects.com/rmsportal/dNuvNrtqUztHCwM.png"
multipleLine
>
Title <Brief>subtitle</Brief>
</Item>
</List>
<List renderHeader={"Align Vertical Center"} className="my-list">
<Item multipleLine extra="extra content">
Title <Brief>subtitle</Brief>
</Item>
</List>
<List renderHeader={"Icon in the left"}>
<Item
thumb="https://zos.alipayobjects.com/rmsportal/dNuvNrtqUztHCwM.png"
arrow="horizontal"
onClick={() => {}}
>
My wallet
</Item>
<Item
thumb="https://zos.alipayobjects.com/rmsportal/UmbJMbWOejVOpxe.png"
onClick={() => {}}
arrow="horizontal"
>
My Cost Ratio
</Item>
</List>
<List renderHeader={"Text Wrapping"} className="my-list">
<Item data-seed="logId">
Single line,long text will be hidden with ellipsis;
</Item>
<Item wrap>
Multiple line,long text will wrap;Long Text Long Text Long Text Long
Text Long Text Long Text
</Item>
<Item extra="extra content" multipleLine align="top" wrap>
Multiple line and long text will wrap. Long Text Long Text Long Text
</Item>
<Item extra="no arrow" arrow="empty" className="spe" wrap>
In rare cases, the text of right side will wrap in the single line
with long text. long text long text long text
</Item>
</List>
<List renderHeader={"Other"} className="my-list">
<Item
disabled={disabled}
extra=""
onClick={() => setDisabled(!disabled)}
>
Click to disable
</Item>
<Item>
<select defaultValue="1">
<option value="1">Html select element</option>
<option value="2" disabled>
Unable to select
</option>
<option value="3">option 3</option>
</select>
</Item>
</List>
</>
);
};
export default App;