Skip to content

Commit ad93e94

Browse files
kgshvethanshar
andauthored
Copy-editing of the docs (#1571)
* Copy-editing * Basic copy-editing Co-authored-by: Ethan Sharabi <[email protected]>
1 parent 855cedd commit ad93e94

File tree

9 files changed

+61
-54
lines changed

9 files changed

+61
-54
lines changed

markdowns/foundation/assets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ index: 6
33
path: "/foundation/assets"
44
title: "Assets"
55
---
6-
Assets are big part of the whole UI system, whether it's an icon, placeholder or an illustration, we use them everywhere.
7-
Load assets groups and easily render them with the _Image_ component.
6+
Assets are a big part of the whole UI system, whether it's an icon, placeholder or an illustration, we use them everywhere.
7+
Load groups of assets and easily render them with the _Image_ component.
88

99
```javascript
1010
import {Assets, Image} from 'react-native-ui-lib';

markdowns/foundation/colors.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "Colors"
55
---
66

77
#### loadColors
8-
Load set of colors to use in the app.
8+
Load a set of colors to be used in the app.
99
These colors will be accessible through the Colors class and as modifiers.
1010
usage:
1111
```javascript
@@ -28,8 +28,8 @@ import {View, Text, Colors} from 'react-native-ui-lib';
2828
```
2929

3030
#### loadSchemes
31-
Load set of scheme colors to support dark/light mode.
32-
This features works hand in hand with our modifiers
31+
Load a set of scheme colors to support dark/light mode.
32+
This feature works hand in hand with our modifiers
3333

3434
```js
3535
Colors.loadSchemes({
@@ -73,11 +73,11 @@ usage:
7373
import {Colors} from 'react-native-ui-lib';
7474

7575
Colors.getColorTint(Colors.green30, 70); // will return the value of Colors.green70
76-
Colors.getColorTint('#ff2442, 50); // will return the 5th tint in an autogenerate 8 tints palette based on #ff2442
76+
Colors.getColorTint('#ff2442', 50); // will return the 5th tint in an autogenerate 8-tints palette based on '#ff2442'
7777
```
7878

7979
#### isDark
80-
returns if a color is considered dark (bright colors will return false)
80+
returns `true` if a color is considered dark (bright colors will return `false`)
8181
```js
8282
import {Colors} from 'react-native-ui-lib';
8383

markdowns/foundation/modifiers.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ index: 5
33
path: "/foundation/modifiers"
44
title: "Modifiers"
55
---
6-
As you probably noticed already, we translate our style presets into modifiers.
7-
**Modifiers** will help you create a stunning UI easily and quickly.
6+
As you have probably noticed already, we translate our style presets into modifiers.
7+
**Modifiers** help you create a stunning UI easily and quickly.
88

99
**[!IMPORTANT]** <br>
10-
Make sure to use modifiers only on uilib components, some modifiers can cause issues on Android when used on React Native components directly.
10+
Make sure to use modifiers only on UILib components, as some modifiers can cause issues on Android when used on React Native components directly.
1111

1212
## Layout Modifiers
13-
Use our alignment props to quickly position your view's content without getting confused calculating all these flex rules.
13+
Use our alignment properties to quickly position the content of your view without getting confused calculating all those flex rules.
1414
- flex - apply `flex:1` on a view
1515
- flex-[value] - When you want to control the flex value
1616
- flexS - FlexShrink
@@ -51,7 +51,7 @@ Use our alignment props to quickly position your view's content without getting
5151
<img src="https://cloud.githubusercontent.com/assets/1780255/24798566/4de91efc-1b9f-11e7-9974-e06e3daa7c63.png" width="160"/> <img src="https://cloud.githubusercontent.com/assets/1780255/24798569/50dc99a4-1b9f-11e7-8231-fbcbb139a010.png" width="160"/> <img src="https://cloud.githubusercontent.com/assets/1780255/24798571/52766d08-1b9f-11e7-95a3-b2b262e81170.png" width="160"/> <img src="https://cloud.githubusercontent.com/assets/1780255/24798572/545b7abe-1b9f-11e7-9098-409ceee6ff22.png" width="160"/> <img src="https://cloud.githubusercontent.com/assets/1780255/24798575/55e3c4f4-1b9f-11e7-998d-7986a038abb6.png" width="160"/>
5252

5353
## Spacing Modifiers
54-
It's always important to use your margins and paddings correctly, with modifiers it is simpler to do so.
54+
It's always important to use your margins and paddings correctly, and that's also easier to do with modifiers:
5555

5656
- padding-[value] - will add padding to all corners (e.g. padding-30 will add 30 pt of padding)
5757
- paddingL-[value] - Left padding
@@ -81,16 +81,16 @@ It's always important to use your margins and paddings correctly, with modifiers
8181
<View margin-s5 padding-s2>...</View>
8282
```
8383
## Position Modifiers
84-
Use the position modifiers to quickly set an absolute position to your views
84+
Use the position modifiers to quickly set an absolute position for your views.
8585
- `abs` will set the absolute position on your View
86-
- `absL`, `absT`, `absR`, `absB` - set the absolute position and align to Left, Top, Right, Botton side accordingly
86+
- `absL`, `absT`, `absR`, `absB` - set the absolute position and align to Left, Top, Right, Bottom accordingly
8787
- `absH` and `absV` - position absolute and stretch horizontally or vertically
8888
- `absF` will set the absolute position and fill the parent view (similar to StyleSheet.absoluteFillObject)
8989

9090
## Styling Modifiers
91-
Last type of modifiers are for styling your components
91+
The last type of modifiers is for styling your components
9292

93-
- [colorKey] - Controls text components' color
93+
- [colorKey] - Controls the color of text components
9494
- background-[colorKey] (or bg-[colorKey]) - Background color
9595

9696
```jsx
@@ -99,13 +99,13 @@ Last type of modifiers are for styling your components
9999
<TouchableOpacity bg-red30/>
100100
```
101101

102-
- [typographyKey] - Controls text components' typography
102+
- [typographyKey] - Controls the typography of text components
103103
```jsx
104104
<Text text70>...</Text>
105105
<TextInput text80/>
106106
```
107107

108-
- br[borderRadiusKey] - Set the view's border radius (e.g. `br10`, `br20`, .., `br60`)
108+
- br[borderRadiusKey] - Set the border radius for the view (e.g. `br10`, `br20`, .., `br60`)
109109
```jsx
110110
<View br40>...</View>
111111
```
@@ -116,4 +116,4 @@ You can load your own presets and use them as modifiers.
116116

117117

118118

119-
Check out [this example](/react-native-ui-lib/getting-started/usage) where we use most of these props
119+
Check out [this example](/react-native-ui-lib/getting-started/usage) where we use most of these props.

markdowns/foundation/style.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ title: "Style"
66
The base foundation of each UI component is its style.
77
We use basic style presets to define the rules and the style guide we follow.
88

9-
Our presets includes: **Colors**, **Typography**, **Spacings**, **Shadows**, **Border Radius** and more..
9+
Our presets include: **Colors**, **Typography**, **Spacings**, **Shadows**, **Border Radius** and more..
1010

1111
The UILib already comes with a set of predefined constants and [presets](https://github.com/wix/react-native-ui-lib/tree/master/src/style).
1212

13-
You can easily use it anywhere in your code as you would have used any other constant value, or as a component modifier.
13+
You can easily use it anywhere in your code (as you would use any other constant value), or as a component modifier.
1414

1515
It's also very easy to define your own presets..
1616

@@ -32,12 +32,12 @@ Spacings.loadSpacings({
3232
});
3333
```
3434

35-
and so for example, the following line
35+
For example, the following line
3636

3737
```jsx
3838
<Text h1 pink>Hello World</Text>
3939
```
4040
Will generate this text
4141
<img src="https://cloud.githubusercontent.com/assets/1780255/24792314/296b7ebc-1b86-11e7-8580-9252d1ddf5d9.png" width="250"/>
4242

43-
It will use the _h1_ preset for typography and the _pink_ color value we set to style the Text element.
43+
It will use the _h1_ preset for typography and the _pink_ color value we set to style the Text element.

markdowns/foundation/theme-manager.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ index: 7
33
path: "/foundation/theme-manager"
44
title: "Theme Manager"
55
---
6-
Use the `ThemeManager` to set default global behavior for your app.
6+
Use `ThemeManager` to set default global behavior for your app.
77

88
#### setComponentTheme
99

10-
Set default props for a component by passing an object or a callback (for dynamic, runtime default props)
11-
The default value will be overridden if a prop is being passed to the component instance. (See `setComponentForcedTheme` for that)
10+
Set default props for a component by passing an object or a callback (for dynamic, runtime default props)
11+
The default value will be overridden if a prop is being passed to the component instance (see `setComponentForcedTheme` for that).
1212

1313
- `ThemeManager.setComponentTheme(componentName, defaultPropsObject);`
1414
- `ThemeManager.setComponentTheme(componentName, componentProps => newDefaultPropsObject);`
@@ -28,14 +28,14 @@ ThemeManager.setComponentTheme('Button', (props, context) => {
2828

2929
return {
3030
// this will apply a different backgroundColor
31-
// depends if the Button is an outline or not
31+
// depending on whether the Button has an outline or not
3232
backgroundColor: props.outline ? 'black' : 'green',
3333
};
3434
});
3535
```
3636

3737
#### setComponentForcedTheme
38-
Same as `setComponentTheme` only it can't be overridden by props passed to the component.
38+
Same as `setComponentTheme`, but can't be overridden by props passed to the component.
3939

4040
Example
4141

markdowns/getting-started/setup.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ path: "/getting-started/setup"
44
title: "Setup"
55
---
66

7-
## UILib Packages
8-
Before you start.
9-
Starting version 5.12.0 UILib exports individual packages so you can import only what you need.
7+
## Before You Start: UILib Packages
8+
9+
Starting with version 5.12.0 UILib exports individual packages so you can import only what you need.
1010

1111
### Why packages are important?
1212
- Smaller bundle size. By importing only the components you need, your bundle size will be reduced to the files that were imported.
13-
- Quicker setup. Avoid installing peer dependencies and linking native depdencies that you don't need.
13+
- Quicker setup. Avoid installing peer dependencies and linking native dependencies you don't need.
1414

1515
### How does it work?
1616
```javascript
@@ -26,10 +26,10 @@ import {KeyboardTrackingView, KeyboardAwareInsetsView, KeyboardRegistry, Keyboar
2626
First, run `npm install react-native-ui-lib`
2727

2828
### Peer Dependencies
29-
If you're planning on using specific components, see **UILib Packages**.
29+
If you plan on using specific components, see **UILib Packages** above.
3030
*For some packages you might still need to install one of the peer dependencies*
3131

32-
If you want it all, install **peer dependencies**
32+
If you want it all, install **peer dependencies**:
3333
```js
3434
npm i react-native-gesture-handler react-native-reanimated @react-native-community/blur @react-native-community/datetimepicker @react-native-community/netinfo @react-native-picker/picker
3535

@@ -38,11 +38,12 @@ cd ios && pod install
3838

3939

4040
## Install Native Dependencies
41-
If you're planning on using specific components, see **UILib Packages**.
41+
If you plan on using specific components, see **UILib Packages**.
4242
*For some packages you might still need to install one of the native dependencies*
4343

44-
Some of the components are using the following native dependencies, they are defined as peer dependencies so you can install the version that suit you.
45-
It's important to run `cd ios && pod install` if you are using a component that has native dependency
44+
Some of the components are using the native dependencies listed below - those are defined as peer dependencies, so you can install the version that suits you.
45+
46+
> It's important to run `cd ios && pod install` if you are using a component that has a native dependency.
4647
4748
- "react-native-gesture-handler": ">=1.9.0" (mandatory)
4849
- "react-native-reanimated": ">=1.13.2" (mandatory)
@@ -59,4 +60,4 @@ Our demo app is located [here](https://github.com/wix/react-native-ui-lib/tree/m
5960
- Install dependencies: `npm install`
6061
- (for iOS) `cd ios && pod install && cd ..`
6162
- Start the packager: `npm start`
62-
- Build the app: `npm run ios` or `npm run android` (or from Xcode or Android Studio)
63+
- Build the app: `npm run ios` or `npm run android` (or from Xcode or Android Studio).

markdowns/getting-started/usage.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ title: "Usage"
66
This is a quick example of how to use our basic components, modifiers and presets to generate a good looking screen. <br>
77
For detailed information please go over the other sections: Style, Modifiers, Components...
88

9+
<!--
10+
COPY-EDITOR NOTE
11+
12+
The renders of the phone screen image I get in both Chrome and in the VSCode Markdown preview show the phone image overlaying the code part and the text above it - please check the layout of the image in the rendered docs.
13+
-->
14+
915
<img style="float: right; margin-top: -70px" src="https://cloud.githubusercontent.com/assets/1780255/24791489/f5db80f4-1b82-11e7-8538-5a3388fb4345.png" width=300 />
1016

1117
```jsx

markdowns/getting-started/v5.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ title: "v4 -> v5"
77

88
### Presets Updates
99

10-
- **Typography** - Now provide a full set of typographies in all weights
10+
- **Typography** - Now provides a full set of typographies in all weights
1111
- **Colors**
12-
- **Spacings** - unified both platforms to the same spacing presets (multiples of 4s)
12+
- **Spacings** - Unified both platforms to the same spacing presets (multiples of 4s).
1313

1414
---
1515

@@ -33,7 +33,7 @@ props change:
3333
Old implementation was deprecated. See new [example screen](https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/DialogScreen.js)
3434

3535
#### TextInput
36-
Component renamed to `TextField` and now enhanced with more form capabilities like validations. <br>
36+
Component renamed to `TextField` and enhanced with more form capabilities like validations. <br>
3737
`<TextField placeholder="Enter email" validate="email" errorMessage="Email is invalid" />`
3838

3939
#### RadioGroup
@@ -43,29 +43,29 @@ props change:
4343
#### Toast
4444
Implementation had slightly changed, please see [example screen](https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/ToastsScreen.js)
4545
- `relative` value for `position` prop was removed
46-
- Blur effect is not part of the component
46+
- Blur effect is not part of the component
4747

4848
#### ListItem
49-
Component not supporting animation out of the box (animatable wrapper was removed)
49+
Component not supporting animation out of the box (animatable wrapper was removed).
5050

5151
#### LoaderScreen
52-
Remove `animationProps`.
52+
Remove `animationProps`
5353

5454
#### Drawer
55-
Component implementation was completely changed and using `react-native-gesture-handler` as its base infrastructure instead of `react-native-interactable`
55+
Component implementation was completely changed and is using `react-native-gesture-handler` as its base infrastructure instead of `react-native-interactable`
5656
Please see [example screen](https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/DrawerScreen.tsx)
5757

5858
#### Carousel
5959
Component API and implementation has changed.
60-
Now supports non full-page carousel and better way of rendering Carousel children.
60+
Now supports non-full-page carousel and a better way of rendering Carousel children.
6161

62-
Please refer our [Docs](https://wix.github.io/react-native-ui-lib/) to learn on the new API.
62+
Please refer to our [Docs](https://wix.github.io/react-native-ui-lib/) to learn more about the new API.
6363

6464
---
6565
### Removed Dependencies
6666
- react-native-interactable
6767

68-
### New Peer Dependencies (those should be installed separately)
68+
### New Peer Dependencies (these should be installed separately)
6969
- `react-native-reanimated`
7070
- `react-native-gesture-handler`
7171
- `@react-native-community/blur`
@@ -79,4 +79,4 @@ Please refer our [Docs](https://wix.github.io/react-native-ui-lib/) to learn on
7979
- `Tour`
8080
- `Notification`
8181
- `CardItem`
82-
- `CardSection`
82+
- `CardSection`

markdowns/getting-started/v6.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ title: "v5 -> v6"
88
### Presets
99

1010
#### Colors
11-
Update colors palette to more accessible ones.
11+
The colors of the palette were updated to more accessible ones.
1212
Renamed dark preset (dark10, dark20, ...) to grey (grey10, grey20, ...)
1313

1414
#### Shadows
15-
Shadows old presets changed to Shadows.sh10.top/bottom, Shadows.sh20.top/bottom & Shadows.sh30.top/bottom
15+
Old shadow presets changed to `Shadows.sh10.top/bottom`, `Shadows.sh20.top/bottom` & `Shadows.sh30.top/bottom`
1616

1717
### Components
1818

@@ -29,7 +29,7 @@ Service was removed
2929
Component was removed, please use `ChipsInput` instead
3030

3131
#### ThemeManager
32-
`ThemeManager.setTheme` api was removed
32+
`ThemeManager.setTheme` API was removed
3333

3434
#### Avatar
3535
- `isOnline` removed (use badgeProps instead)
@@ -38,7 +38,7 @@ Component was removed, please use `ChipsInput` instead
3838
#### Badge
3939
- `animationProps` (please wrap with your own animated view)
4040
- `testId` (renamed `testID`)
41-
- `size` will not accept enum 'BADGE_SIZES' anymore, pass number instead
41+
- `size` will not accept enum 'BADGE_SIZES' anymore, pass a number instead
4242

4343
See conversion map
4444
```
@@ -52,7 +52,7 @@ large -> 24
5252

5353
#### Card.Image
5454
- `imageSource` (renamed `source`)
55-
- `borderRadius` (should be pass to Card component)
55+
- `borderRadius` (should be passed to the Card component)
5656

5757
#### PanningProviderDirection
5858
Renamed `PanningDirection`

0 commit comments

Comments
 (0)