Skip to content

Commit 994e968

Browse files
committed
Merge branch 'master' into release
2 parents 9240746 + fa8b7de commit 994e968

File tree

197 files changed

+1717
-4443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+1717
-4443
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://stand-with-ukraine.pp.ua)
2+
13
<p align="center">
24
<img src="https://user-images.githubusercontent.com/1780255/105469025-56759000-5ca0-11eb-993d-3568c1fd54f4.png" height="250px" style="display:block"/>
35
</p>
@@ -6,13 +8,12 @@
68
<img src="https://user-images.githubusercontent.com/1780255/105469340-bec47180-5ca0-11eb-8986-3eb986f884d9.jpg"/>
79
</p>
810

9-
1011
---
12+
1113
[![Build Status](https://travis-ci.org/wix/react-native-ui-lib.svg?branch=master)](https://travis-ci.org/wix/react-native-ui-lib)
1214
[![npm](https://img.shields.io/npm/v/react-native-ui-lib.svg)](https://www.npmjs.com/package/react-native-ui-lib)
1315
[![NPM Downloads](https://img.shields.io/npm/dm/react-native-ui-lib.svg?style=flat)](https://www.npmjs.com/package/react-native-ui-lib)
14-
<a href="https://twitter.com/rnuilib"><img src="https://img.shields.io/twitter/follow/rnuilib.svg?style=flat&colorA=1DA1F2&colorB=20303C&label=Follow%20us%20on%20Twitter" alt="Follow on Twitter"></a>
15-
16+
<a href="https://twitter.com/rnuilib"><img src="https://img.shields.io/twitter/follow/rnuilib.svg?style=flat&colorA=1DA1F2&colorB=20303C&label=Follow%20us%20on%20Twitter" alt="Follow on Twitter"></a>
1617

1718
Check out our [Docs](https://wix.github.io/react-native-ui-lib/). <br>
1819
Our [Discord Channel](https://discord.gg/2eW4g6Z)
@@ -21,23 +22,26 @@ Download our Expo demo app <br>
2122
<img height="120" src="https://user-images.githubusercontent.com/1780255/76164023-f2171400-6153-11ea-962d-d57b64a08a80.png"> <br>
2223
(You will need the Expo App)
2324

24-
2525
## Installing
2626

2727
See setup instructions [here](https://wix.github.io/react-native-ui-lib/docs/getting-started/setup).
2828

2929
#### New Major Version 6.0
30+
3031
See [breaking changes](https://wix.github.io/react-native-ui-lib/docs/getting-started/v6)
3132

3233
#### For React Native >= 0.60.0
34+
3335
please use `react-native-ui-lib`
3436

3537
#### For React Native < 0.60.0
38+
3639
please use `react-native-ui-lib@^3.0.0`
3740

3841
## Create your own Design System in 3 easy steps
3942

4043
### Step 1
44+
4145
Load your foundations and presets (colors, typography, spacings, etc...)
4246

4347
```js
@@ -57,18 +61,18 @@ Colors.loadColors({
5761
Typography.loadTypographies({
5862
heading: {fontSize: 36, fontWeight: '600'},
5963
subheading: {fontSize: 28, fontWeight: '500'},
60-
body: {fontSize: 18, fontWeight: '400'},
64+
body: {fontSize: 18, fontWeight: '400'}
6165
});
6266

6367
Spacings.loadSpacings({
6468
page: 20,
6569
card: 12,
6670
gridGutter: 16
6771
});
68-
6972
```
7073

7174
### Step 2
75+
7276
Set default configurations to your components
7377

7478
```js
@@ -94,8 +98,9 @@ ThemeManager.setComponentTheme('Button', (props, context) => {
9498
```
9599

96100
### Step 3
97-
Use it all together.
98-
Your configurations will be applied on uilib components so you can use them easily with [modifiers](https://wix.github.io/react-native-ui-lib/docs/foundation/modifiers).
101+
102+
Use it all together.
103+
Your configurations will be applied on uilib components so you can use them easily with [modifiers](https://wix.github.io/react-native-ui-lib/docs/foundation/modifiers).
99104

100105
```jsx
101106
// MyScreen.js
@@ -107,15 +112,16 @@ class MyScreen extends Component {
107112
render() {
108113
return (
109114
<View flex padding-page>
110-
<Text heading marginB-s4>My Screen</Text>
115+
<Text heading marginB-s4>
116+
My Screen
117+
</Text>
111118
<Card height={100} center padding-card marginB-s4>
112119
<Text body>This is an example card </Text>
113120
</Card>
114-
121+
115122
<Button label="Button" body bg-primaryColor square></Button>
116123
</View>
117124
);
118125
}
119126
}
120127
```
121-

demo/src/screens/MenuStructure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export const navigationData = {
135135
tags: 'KeyboardTracking',
136136
screen: 'unicorn.nativeComponents.KeyboardTrackingViewScreen'
137137
},
138-
{title: 'KeyboardAccessoryView', tags: 'KeyboardInput', screen: 'unicorn.nativeComponents.KeyboardInputViewScreen'}
138+
{title: 'KeyboardAccessoryView', tags: 'KeyboardInput', screen: 'unicorn.nativeComponents.KeyboardAccessoryViewScreen'}
139139
]
140140
},
141141
AnimationsAndGestures: {

demo/src/screens/PlaygroundScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class PlaygroundScreen extends Component {
88
return (
99
<View bg-grey80 flex padding-20>
1010
<View marginT-20>
11-
<TextField placeholder="Placeholder" />
11+
<TextField migrate placeholder="Placeholder" />
1212
</View>
1313
<Card height={100} center padding-20>
1414
<Text text50>Playground Screen</Text>

demo/src/screens/SettingsScreen.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ class SettingsScreen extends Component {
7373
testID={'uilib.defaultScreenPicker'}
7474
placeholder="Pick default screen..."
7575
showSearch
76-
value={defaultScreen}
76+
value={defaultScreen?.value}
77+
label={'Default Screen'}
7778
onChange={this.setDefaultScreen}
79+
migrateTextField
7880
>
7981
{_.map(filteredScreens, screen => (
80-
<Picker.Item key={screen.value} value={screen}/>
82+
<Picker.Item key={screen.value} value={screen.value} label={screen.label}/>
8183
))}
8284
</Picker>
8385

demo/src/screens/componentScreens/ButtonsScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
} from 'react-native-ui-lib'; //eslint-disable-line
1212

1313
const ButtonSpace = 20;
14-
const plusIcon = require('../../assets/icons/plus.png');
15-
const settingsIcon = require('../../assets/icons/settings.png');
14+
const plusIcon = Assets.getAssetByPath('icons.demo.plus');
15+
const settingsIcon = Assets.getAssetByPath('icons.demo.settings');
1616
const labelButton = {label: 'Animated'};
1717
const iconButton = {round: true, iconStyle: {tintColor: Colors.white}};
1818

demo/src/screens/componentScreens/GridViewScreen.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import _ from 'lodash';
2-
import {View, Text, Image, Colors, Constants, Avatar, GridView, Shadows, Card} from 'react-native-ui-lib';
2+
import {View, Text, Image, Colors, Constants, Avatar, GridView, Card} from 'react-native-ui-lib';
33
import React, {Component} from 'react';
44
import {Alert, ScrollView} from 'react-native';
55
import conversations from '../../data/conversations';
@@ -153,7 +153,7 @@ class GridViewScreen extends Component {
153153
items={contacts}
154154
// viewWidth={300}
155155
numColumns={6}
156-
lastItemOverlayColor={Colors.primary}
156+
lastItemOverlayColor={Colors.rgba(Colors.primary, 0.6)}
157157
lastItemLabel={7}
158158
/>
159159

@@ -163,7 +163,7 @@ class GridViewScreen extends Component {
163163
<GridView
164164
items={products}
165165
numColumns={4}
166-
lastItemOverlayColor={Colors.primary}
166+
lastItemOverlayColor={Colors.rgba(Colors.primary, 0.6)}
167167
lastItemLabel={42}
168168
keepItemSize
169169
/>

0 commit comments

Comments
 (0)