Skip to content

Commit fdc6bf4

Browse files
committed
Fixed some issues.
Cleared LayoutAnimation definitions. Refactored some code blocks.
1 parent b0aaf47 commit fdc6bf4

File tree

21 files changed

+588
-247
lines changed

21 files changed

+588
-247
lines changed

example/screens/Avatar.tsx

Lines changed: 193 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Avatar } from '@muratoner/semantic-ui-react-native';
1+
import { Avatar, Divider } from '@muratoner/semantic-ui-react-native';
22
import React from 'react';
33
import {
44
Alert,
@@ -23,6 +23,7 @@ const Component = () => {
2323
margin: 10
2424
}}
2525
>
26+
<Divider title="TextColorMode Is black-white" />
2627
<View
2728
style={{
2829
flexDirection: 'row',
@@ -31,68 +32,208 @@ const Component = () => {
3132
width: '100%'
3233
}}
3334
>
34-
<Avatar title="Yvette Barton" size={32} titleShowLimit={2} />
35-
<Avatar title="Esta Moore" size={32} titleShowLimit={2} />
36-
<Avatar title="Jermaine Schiller" size={32} titleShowLimit={2} />
37-
<Avatar title="Estelle Monahan" size={32} titleShowLimit={2} />
38-
<Avatar title="Frieda Christiansen II" size={32} />
39-
<Avatar title="Tatyana Cassin MD" size={32} />
4035
<Avatar
41-
title="Eulah Hegmann Monahan"
42-
size={32}
43-
withRandomColor={false}
36+
title="Yvette Barton"
37+
size={64}
38+
titleShowLimit={2}
39+
bordered
4440
/>
41+
<Avatar title="Nihal Kerem" size={64} titleShowLimit={2} bordered />
42+
<Avatar
43+
title="Kermaine Schiller"
44+
size={64}
45+
titleShowLimit={2}
46+
circular={false}
47+
bordered
48+
/>
49+
<Avatar
50+
title="Estelle Monahan"
51+
size={64}
52+
titleShowLimit={2}
53+
raised
54+
/>
55+
<Avatar title="Frieda Christiansen II" size={64} raised />
4556
</View>
4657
<Stack size={10} />
47-
<Avatar
48-
title="Deanna"
49-
size={64}
50-
shortestTitle={false}
51-
onPress={() => Alert.alert('Clicked Deanna avatar :)')}
52-
/>
53-
<Stack size={10} />
54-
<Avatar title="Murat Öner" size={128} titleShowLimit={2} />
55-
<Stack size={10} />
56-
<Avatar
57-
title={'Trent Lemke'}
58-
size={32}
59-
source={{
60-
uri: 'https://i.pravatar.cc/32'
61-
}}
62-
/>
63-
<Stack size={10} />
64-
<Avatar
65-
title={'Deon Legros'}
66-
size={64}
67-
source={{
68-
uri: 'https://i.pravatar.cc/64'
58+
<Divider title="TextColorMode Is light" />
59+
<View
60+
style={{
61+
flexDirection: 'row',
62+
justifyContent: 'space-around',
63+
flex: 1,
64+
width: '100%'
6965
}}
70-
/>
66+
>
67+
<Avatar
68+
title="Yvette Barton"
69+
textColorMode="light"
70+
size={64}
71+
bordered
72+
titleShowLimit={2}
73+
/>
74+
<Avatar
75+
title="Nihal Kerem"
76+
textColorMode="light"
77+
size={64}
78+
bordered
79+
titleShowLimit={2}
80+
/>
81+
<Avatar
82+
title="Kermaine Schiller"
83+
textColorMode="light"
84+
size={64}
85+
titleShowLimit={2}
86+
circular={false}
87+
/>
88+
<Avatar
89+
title="Estelle Monahan"
90+
textColorMode="light"
91+
size={64}
92+
titleShowLimit={2}
93+
raised
94+
/>
95+
<Avatar
96+
title="Frieda Christiansen II"
97+
textColorMode="light"
98+
size={64}
99+
raised
100+
/>
101+
</View>
71102
<Stack size={10} />
72-
<Avatar
73-
title={'Rhett Reichert'}
74-
titleShowLimit={2}
75-
size={128}
76-
source={{
77-
uri: 'https://i.pravatar.cc/128'
103+
<Divider title="Show Full Name" />
104+
<View
105+
style={{
106+
flexDirection: 'row',
107+
justifyContent: 'space-around',
108+
flex: 1,
109+
width: '100%'
78110
}}
79-
/>
111+
>
112+
<Avatar
113+
title="Deanna"
114+
size={64}
115+
bordered
116+
shortestTitle={false}
117+
onPress={() => Alert.alert('Clicked Deanna avatar :)')}
118+
/>
119+
<Avatar title="Yvette" bordered size={64} shortestTitle={false} />
120+
<Avatar
121+
title="Esta"
122+
size={64}
123+
shortestTitle={false}
124+
circular={false}
125+
/>
126+
<Avatar title="Kermaine" size={64} shortestTitle={false} raised />
127+
<Avatar title="Estelle" size={64} shortestTitle={false} raised />
128+
</View>
80129
<Stack size={10} />
81-
<Avatar
82-
icon={{
83-
name: 'user',
84-
type: 'AntDesign',
85-
color: 'white'
130+
<Divider title="With Image" />
131+
<View
132+
style={{
133+
flexDirection: 'row',
134+
justifyContent: 'space-around',
135+
flex: 1,
136+
width: '100%'
86137
}}
87-
/>
138+
>
139+
<Avatar
140+
title={'Deon Legros'}
141+
size={64}
142+
bordered
143+
source={{
144+
uri: 'https://i.pravatar.cc/128?img=1'
145+
}}
146+
/>
147+
<Avatar
148+
title={'Rhett Reichert'}
149+
titleShowLimit={2}
150+
size={64}
151+
bordered
152+
source={{
153+
uri: 'https://i.pravatar.cc/1920?img=2'
154+
}}
155+
/>
156+
<Avatar
157+
title={'Trent Lemke'}
158+
size={64}
159+
circular={false}
160+
source={{
161+
uri: 'https://i.pravatar.cc/128?img=3'
162+
}}
163+
/>
164+
<Avatar
165+
title={'Trent Lemke'}
166+
size={64}
167+
raised
168+
source={{
169+
uri: 'https://i.pravatar.cc/128?img=4'
170+
}}
171+
/>
172+
<Avatar
173+
title={'Trent Lemke'}
174+
size={64}
175+
raised
176+
source={{
177+
uri: 'https://i.pravatar.cc/128?img=5'
178+
}}
179+
/>
180+
</View>
88181
<Stack size={10} />
89-
<Avatar
90-
size={128}
91-
icon={{
92-
name: 'home',
93-
type: 'AntDesign'
182+
183+
<Divider title="With Icon" />
184+
<View
185+
style={{
186+
flexDirection: 'row',
187+
justifyContent: 'space-around',
188+
flex: 1,
189+
width: '100%'
94190
}}
95-
/>
191+
>
192+
<Avatar
193+
size={64}
194+
bordered
195+
icon={{
196+
name: 'user',
197+
type: 'AntDesign',
198+
color: 'white'
199+
}}
200+
/>
201+
<Avatar
202+
size={64}
203+
bordered
204+
icon={{
205+
name: 'facebook',
206+
type: 'FontAwesome',
207+
color: 'white'
208+
}}
209+
/>
210+
<Avatar
211+
size={64}
212+
circular={false}
213+
icon={{
214+
name: 'flickr',
215+
type: 'FontAwesome',
216+
color: 'white'
217+
}}
218+
/>
219+
<Avatar
220+
size={64}
221+
raised
222+
icon={{
223+
name: 'twitter',
224+
type: 'FontAwesome',
225+
color: 'white'
226+
}}
227+
/>
228+
<Avatar
229+
size={64}
230+
raised
231+
icon={{
232+
name: 'home',
233+
type: 'AntDesign'
234+
}}
235+
/>
236+
</View>
96237
</View>
97238
</ScrollView>
98239
</SafeAreaView>

example/screens/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const Component = () => {
5757
</Inset>
5858
<Checkbox checked={checked} onChanged={setChecked} type="toggle" />
5959
<Inset vertical={20}>
60-
<Divider text="Disable Status" />
60+
<Divider title="Disable Status" />
6161
</Inset>
6262
<Checkbox
6363
checked={checked}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@muratoner/semantic-ui-react-native",
3-
"version": "1.0.15",
3+
"version": "1.0.18",
44
"description": "Semantic UI React Native - User Interface is the language of the mobile",
55
"main": "src/index.js",
66
"files": [
@@ -20,7 +20,7 @@
2020
"test:ci": "jest --runInBand",
2121
"test:watch": "jest --watch",
2222
"postinstall": "opencollective-postinstall || exit 0",
23-
"lint": "eslint",
23+
"lint": "eslint --ext js,ts",
2424
"prettify": "prettier",
2525
"clean-install": "rimraf node_modules && yarn",
2626
"changelog": "auto-changelog -p"
@@ -45,10 +45,10 @@
4545
"devDependencies": {
4646
"@react-native-community/eslint-config": "^2.0.0",
4747
"@testing-library/react-native": "^7.0.2",
48+
"@types/jest": "^26.0.19",
4849
"@types/prop-types": "^15.7.3",
4950
"@types/react": "^16.9.0",
5051
"@types/react-native": "^0.63.2",
51-
"@types/jest": "^26.0.19",
5252
"auto-changelog": "^2.2.1",
5353
"babel-jest": "^26.3.0",
5454
"enzyme": "^3.11.0",

0 commit comments

Comments
 (0)