Skip to content

Commit e5029ad

Browse files
committed
Publish v1.3.0
1 parent 22188cf commit e5029ad

21 files changed

+167
-212
lines changed

core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native-material/core",
3-
"version": "1.2.9",
3+
"version": "1.3.0",
44
"description": "Modular and customizable Material Design UI components for React Native",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

docs/docs/components/activity-indicator.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { VStack, ActivityIndicator } from "@react-native-material/core";
88
import Icon from "@expo/vector-icons/MaterialCommunityIcons";
99

1010
const App = () => (
11-
<VStack flex justify="center" align="center" spacing={4}>
11+
<VStack fill center spacing={4}>
1212
<ActivityIndicator />
1313
<ActivityIndicator size="large" />
1414
<ActivityIndicator size="small" color="error" />
@@ -47,23 +47,19 @@ const App = () => (
4747
<>
4848
<AppBar
4949
title="Title"
50-
leading={(props) => (
50+
leading={props => (
5151
<IconButton
52-
icon={(props) => <Icon name="menu" {...props} />}
52+
icon={props => <Icon name="menu" {...props} />}
5353
{...props}
5454
/>
5555
)}
56-
trailing={(props) => (
57-
<Stack
58-
justify="center"
59-
align="center"
60-
style={{ width: 48, height: 48 }}
61-
>
56+
trailing={props => (
57+
<Stack center style={{ width: 48, height: 48 }}>
6258
<ActivityIndicator size="small" color="onPrimary" />
6359
</Stack>
6460
)}
6561
/>
66-
<Stack flex justify="center" align="center">
62+
<Stack fill center>
6763
<Button title="Button" loading disabled />
6864
</Stack>
6965
<FAB

docs/docs/components/app-bar.md

+22-34
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,17 @@ import Icon from "@expo/vector-icons/MaterialCommunityIcons";
3737
const App = () => (
3838
<AppBar
3939
title="Title"
40-
leading={(props) => (
41-
<IconButton
42-
icon={(props) => <Icon name="menu" {...props} />}
43-
{...props}
44-
/>
40+
leading={props => (
41+
<IconButton icon={props => <Icon name="menu" {...props} />} {...props} />
4542
)}
46-
trailing={(props) => (
43+
trailing={props => (
4744
<HStack>
4845
<IconButton
49-
icon={(props) => <Icon name="magnify" {...props} />}
46+
icon={props => <Icon name="magnify" {...props} />}
5047
{...props}
5148
/>
5249
<IconButton
53-
icon={(props) => <Icon name="dots-vertical" {...props} />}
50+
icon={props => <Icon name="dots-vertical" {...props} />}
5451
{...props}
5552
/>
5653
</HStack>
@@ -78,13 +75,13 @@ const App = () => {
7875
return (
7976
<AppBar
8077
title="Title"
81-
leading={(props) => (
78+
leading={props => (
8279
<IconButton
83-
icon={(props) => <Icon name="menu" {...props} />}
80+
icon={props => <Icon name="menu" {...props} />}
8481
{...props}
8582
/>
8683
)}
87-
trailing={(props) =>
84+
trailing={props =>
8885
loggedIn ? (
8986
<IconButton
9087
icon={<Avatar label="Yaman KATBY" size={28} />}
@@ -119,22 +116,19 @@ import Icon from "@expo/vector-icons/MaterialCommunityIcons";
119116
const App = () => (
120117
<AppBar
121118
variant="bottom"
122-
leading={(props) => (
123-
<IconButton
124-
icon={(props) => <Icon name="menu" {...props} />}
125-
{...props}
126-
/>
119+
leading={props => (
120+
<IconButton icon={props => <Icon name="menu" {...props} />} {...props} />
127121
)}
128-
trailing={(props) => (
122+
trailing={props => (
129123
<IconButton
130-
icon={(props) => <Icon name="magnify" {...props} />}
124+
icon={props => <Icon name="magnify" {...props} />}
131125
{...props}
132126
/>
133127
)}
134128
style={{ position: "absolute", start: 0, end: 0, bottom: 0 }}
135129
>
136130
<FAB
137-
icon={(props) => <Icon name="plus" {...props} />}
131+
icon={props => <Icon name="plus" {...props} />}
138132
style={{ position: "absolute", top: -28, alignSelf: "center" }}
139133
/>
140134
</AppBar>
@@ -155,20 +149,17 @@ const App = () => (
155149
title="Title"
156150
color="pink"
157151
tintColor="red"
158-
leading={(props) => (
159-
<IconButton
160-
icon={(props) => <Icon name="menu" {...props} />}
161-
{...props}
162-
/>
152+
leading={props => (
153+
<IconButton icon={props => <Icon name="menu" {...props} />} {...props} />
163154
)}
164-
trailing={(props) => (
155+
trailing={props => (
165156
<HStack>
166157
<IconButton
167-
icon={(props) => <Icon name="magnify" {...props} />}
158+
icon={props => <Icon name="magnify" {...props} />}
168159
{...props}
169160
/>
170161
<IconButton
171-
icon={(props) => <Icon name="dots-vertical" {...props} />}
162+
icon={props => <Icon name="dots-vertical" {...props} />}
172163
{...props}
173164
/>
174165
</HStack>
@@ -201,15 +192,12 @@ const App = () => (
201192
title="Title"
202193
subtitle="Lorem ipsum"
203194
centerTitle={true}
204-
leading={(props) => (
205-
<IconButton
206-
icon={(props) => <Icon name="menu" {...props} />}
207-
{...props}
208-
/>
195+
leading={props => (
196+
<IconButton icon={props => <Icon name="menu" {...props} />} {...props} />
209197
)}
210-
trailing={(props) => (
198+
trailing={props => (
211199
<IconButton
212-
icon={(props) => <Icon name="dots-vertical" {...props} />}
200+
icon={props => <Icon name="dots-vertical" {...props} />}
213201
{...props}
214202
/>
215203
)}

docs/docs/components/avatar.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { VStack, Avatar } from "@react-native-material/core";
88
import Icon from "@expo/vector-icons/MaterialCommunityIcons";
99

1010
const App = () => (
11-
<VStack flex justify="center" align="center" spacing={4}>
11+
<VStack fill center spacing={4}>
1212
<Avatar label="Kent Dodds" autoColor />
1313
<Avatar image={{ uri: "https://mui.com/static/images/avatar/1.jpg" }} />
14-
<Avatar icon={(props) => <Icon name="account" {...props} />} />
14+
<Avatar icon={props => <Icon name="account" {...props} />} />
1515
</VStack>
1616
);
1717

@@ -34,7 +34,7 @@ import { VStack, Avatar } from "@react-native-material/core";
3434
import Icon from "@expo/vector-icons/MaterialCommunityIcons";
3535

3636
const App = () => (
37-
<VStack flex justify="center" align="center" spacing={4}>
37+
<VStack fill center spacing={4}>
3838
<Avatar label="Kent Dodds" />
3939
<Avatar label="UN" initials={false} />
4040
<Avatar label="Jed Watson" autoColor />
@@ -53,7 +53,7 @@ import { Image } from "react-native";
5353
import { VStack, Avatar } from "@react-native-material/core";
5454

5555
const App = () => (
56-
<VStack flex justify="center" align="center" spacing={4}>
56+
<VStack fill center spacing={4}>
5757
<Avatar image={{ uri: "https://mui.com/static/images/avatar/1.jpg" }} />
5858
<Avatar
5959
image={
@@ -84,15 +84,15 @@ import { VStack, Avatar } from "@react-native-material/core";
8484
import Icon from "@expo/vector-icons/MaterialCommunityIcons";
8585

8686
const App = () => (
87-
<VStack flex justify="center" align="center" spacing={4}>
88-
<Avatar icon={(props) => <Icon name="account" {...props} />} />
87+
<VStack fill center spacing={4}>
88+
<Avatar icon={props => <Icon name="account" {...props} />} />
8989
<Avatar
90-
icon={(props) => <Icon name="account" {...props} />}
90+
icon={props => <Icon name="account" {...props} />}
9191
label="Jed Watson"
9292
autoColor
9393
/>
9494
<Avatar
95-
icon={(props) => <Icon name="calendar" {...props} />}
95+
icon={props => <Icon name="calendar" {...props} />}
9696
label="Tim Neutkens"
9797
autoColor
9898
/>
@@ -109,7 +109,7 @@ import React from "react";
109109
import { VStack, Avatar } from "@react-native-material/core";
110110

111111
const App = () => (
112-
<VStack flex justify="center" align="center" spacing={4}>
112+
<VStack fill center spacing={4}>
113113
<Avatar label="Jed Watson" size={32} />
114114
<Avatar label="Jed Watson" />
115115
<Avatar label="Jed Watson" size={72} />
@@ -127,19 +127,19 @@ import { VStack, Avatar } from "@react-native-material/core";
127127
import Icon from "@expo/vector-icons/MaterialCommunityIcons";
128128

129129
const App = () => (
130-
<VStack flex justify="center" align="center" spacing={4}>
130+
<VStack fill center spacing={4}>
131131
<Avatar label="Kent Dodds" />
132132
<Avatar
133-
icon={(props) => <Icon name="account" {...props} />}
133+
icon={props => <Icon name="account" {...props} />}
134134
color="primary"
135135
/>
136136
<Avatar
137-
icon={(props) => <Icon name="account" {...props} />}
137+
icon={props => <Icon name="account" {...props} />}
138138
color="primary"
139139
tintColor="error"
140140
/>
141141
<Avatar
142-
icon={(props) => <Icon name="account" {...props} />}
142+
icon={props => <Icon name="account" {...props} />}
143143
color="orange"
144144
tintColor="white"
145145
/>
@@ -157,15 +157,15 @@ import { VStack, Avatar } from "@react-native-material/core";
157157
import Icon from "@expo/vector-icons/MaterialCommunityIcons";
158158

159159
const App = () => (
160-
<VStack flex justify="center" align="center" spacing={4}>
160+
<VStack fill center spacing={4}>
161161
<Avatar label="Jed Watson" />
162162
<Avatar
163163
label="Jed Watson"
164-
icon={(props) => <Icon name="account" {...props} />}
164+
icon={props => <Icon name="account" {...props} />}
165165
/>
166166
<Avatar
167167
label="Jed Watson"
168-
icon={(props) => <Icon name="account" {...props} />}
168+
icon={props => <Icon name="account" {...props} />}
169169
image={{ uri: "https://mui.com/static/images/avatar/1.jpg" }}
170170
/>
171171
</VStack>

docs/docs/components/backdrop.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ const App = () => {
2222
<AppBar
2323
title="Screen title"
2424
transparent
25-
leading={(props) => (
25+
leading={props => (
2626
<IconButton
27-
icon={(props) => (
27+
icon={props => (
2828
<Icon name={revealed ? "close" : "menu"} {...props} />
2929
)}
30-
onPress={() => setRevealed((prevState) => !prevState)}
30+
onPress={() => setRevealed(prevState => !prevState)}
3131
{...props}
3232
/>
3333
)}

docs/docs/components/badge.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React from "react";
77
import { Badge, VStack } from "@react-native-material/core";
88

99
const App = () => (
10-
<VStack flex justify="center" align="center" spacing={4}>
10+
<VStack fill center spacing={4}>
1111
<Badge label={4} />
1212
<Badge label={23} />
1313
<Badge label={123} color="primary" />

docs/docs/components/banner.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ import Icon from "@expo/vector-icons/MaterialCommunityIcons";
4545

4646
const App = () => (
4747
<Banner
48-
illustration={(props) => (
48+
illustration={props => (
4949
<Avatar
5050
color="primary"
51-
icon={(props) => <Icon name="wifi-off" {...props} />}
51+
icon={props => <Icon name="wifi-off" {...props} />}
5252
{...props}
5353
/>
5454
)}

0 commit comments

Comments
 (0)