Skip to content

Commit 32df9e8

Browse files
anupamasoklevithomason
authored andcommitted
docs: fix minor grammar and punctuation errors (#3818)
1 parent d100174 commit 32df9e8

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

docs/src/pages/Augmentation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const meta = {
88

99
## `as` prop
1010

11-
Semantic UI React provides a way to compose React components through the `as` prop. It allows to compose component features and props without adding extra nested components.
11+
Semantic UI React provides a way to compose React components through the `as` prop. It allows composing component features and props without adding extra nested components.
1212

1313
```jsx
1414
<>

docs/src/pages/ShorthandProps.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are several forms of shorthand values that can be provided, but all of the
1616

1717
## Object as value
1818

19-
Each component's shorthand has associated default element type. For example, by default there is `<Icon />` element rendered for `Button`'s icon shorthand. It is possible to customize props of this default element by providing props object as shorthand value:
19+
Each component's shorthand has an associated default element type. For example, by default, there is `<Icon />` element rendered for `Button`'s icon shorthand. It is possible to customize props of this default element by providing props object as shorthand value:
2020

2121
```jsx
2222
// 💡 'color' and 'name' will be used as <Icon /> element's props
@@ -57,7 +57,7 @@ It is also possible to pass falsy values (`false`, `null` or `undefined`) - in t
5757

5858
## React Element as value
5959

60-
There are cases where it might be necessary to customize element tree that will be rendered as a shorthand's value. Returning to `Button` example, we might want to render `<i />` instead of default `<Icon />` element. In that case necessary element might be directly provided as shorthand value:
60+
There are cases where it might be necessary to customize the element tree that will be rendered as a shorthand's value. Returning to `Button` example, we might want to render `<i />` instead of default `<Icon />` element. In that case, the necessary element might be directly provided as shorthand value:
6161

6262
```jsx
6363
<Button icon={<i className='my-icon' />} />
@@ -68,25 +68,25 @@ There are cases where it might be necessary to customize element tree that will
6868
<Message.Content>
6969
There is a very important caveat here, though: whenever React Element is directly used as a
7070
shorthand value, all props that Semantic UI React has created for the shorthand's Component will
71-
be spread on the passed element. This means that provided element should be able to handle props
71+
be spread on the passed element. This means that the provided element should be able to handle props
7272
- while this requirement is satisfied for all SUIR components, you should be aware of that when
7373
either HTML or any third-party elements are provided.
7474
</Message.Content>
7575
</Message>
7676

77-
Due to this limitation, you should strive to use other options for shorthand values whenever is possible - for instance, this is how previous example can be rewritten:
77+
Due to this limitation, you should strive to use other options for shorthand values whenever is possible - for instance, this is how the previous example can be rewritten:
7878

7979
```jsx
8080
<Button icon={{ as: 'i', className: 'my-icon' }} />
8181
```
8282

83-
However, there still might be cases where it would be impossible to use object form of the shorthand value - for example, you might want to render some custom elements tree for the shorthand. In that case function value should be used.
83+
However, there still might be cases where it would be impossible to use the object form of the shorthand value - for example, you might want to render some custom elements tree for the shorthand. In that case, function value should be used.
8484

8585
## Function as value
8686

8787
Providing function as a shorthand value is the most involving but, at the same time, the most powerful option for customizing component's shorthand. The only requirements for this function are:
8888

89-
- it should finish syncronously
89+
- it should finish synchronously
9090
- it should return React Element as a result
9191

9292
Thus, in its simplest form, it could be used the following way:
@@ -100,7 +100,7 @@ Thus, in its simplest form, it could be used the following way:
100100

101101
## Customizing rendered shorthand
102102

103-
There is another use case when render function is very useful for - this is the case where custom element's tree should be rendered for the shorthand. As you might recall, there is a problem that might happen when React Element is provided directly as shorthand value - in that case props are not propagated to rendered. In order to avoid that the following strategy should be considered:
103+
There is another use case when render function is very useful for - this is the case where custom element's tree should be rendered for the shorthand. As you might recall, there is a problem that might happen when React Element is provided directly as shorthand value - in that case, props are not propagated to rendered. In order to avoid that the following strategy should be considered:
104104

105105
```jsx
106106
<Button content='Like' icon={(Component, componentProps) => <Label basic>+1</Label>} />

docs/src/pages/Theming.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const meta = {
88

99
## Preface
1010

11-
Semantic UI React does not have own styling system and fully relies on the theming of
11+
Semantic UI React does not have its own styling system and fully relies on the theming of
1212
Semantic UI. It's really powerful, you don't need to know LESS or CSS you can simply
1313
update values of variables or use styles from predefined themes.
1414

@@ -33,7 +33,7 @@ In fact, all you know about theming and styling of Semantic UI is fully applicab
3333

3434
Semantic UI offers its own build system that uses Gulp and produces prepared CSS files.
3535

36-
In all cases we recommend to use the LESS package and tune it into your build system with Webpack. The LESS package also does not depend on Gulp and other cruft things.
36+
In all cases, we recommend to use the LESS package and tune it into your build system with Webpack. The LESS package also does not depend on Gulp and other cruft things.
3737
However, this package is not friendly for Webpack and requires additional configuration.
3838

3939
<Button
@@ -80,7 +80,7 @@ yarn remove semantic-ui semantic-ui-css
8080

8181
### Install required dependencies
8282

83-
Create React App does not support LESS out of the box, we and propose to use [`@craco/craco`](https://www.npmjs.com/package/@craco/craco) to add its support and avoid `eject`. You have to install required packages:
83+
Create React App does not support LESS out of the box; we propose to use [`@craco/craco`](https://www.npmjs.com/package/@craco/craco) to add its support and avoid `eject`. You have to install required packages:
8484

8585
```bash
8686
npm install @craco/craco @semantic-ui-react/craco-less semantic-ui-less --save-dev
@@ -143,7 +143,7 @@ npx @semantic-ui-react/bootstrap
143143

144144
### `theme.config`
145145

146-
This file is mostly prepared but you have to change some details in the bottom of it:
146+
This file is mostly prepared, but you have to change some details in the bottom of it:
147147

148148
```json label=src/semantic-ui/theme.config
149149
/*******************************

docs/src/pages/Usage.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ React components can be installed via <code>yarn</code>:
2525
Themes from Semantic UI >=2.3.x require Semantic UI React >=0.81.0.
2626
</Message>
2727

28-
If you are using TypeScript, you don't need to install anything, typings are included with the package.
28+
If you are using TypeScript, you don't need to install anything; typings are included with the package.
2929

3030
### Theme
3131

@@ -91,7 +91,7 @@ Semantic UI React is fully supported by all modern JavaScript bundlers.
9191

9292
### Create React App
9393

94-
Semantic UI React is fully compatible with `create-react-app` and works out the box. Setup of custom theme is covered in [Theming guide](/theming).
94+
Semantic UI React is fully compatible with `create-react-app` and works out the box. Setting up of custom theme is covered in [Theming guide](/theming).
9595

9696
### Webpack 4
9797

0 commit comments

Comments
 (0)