Skip to content

Commit 1c6bafb

Browse files
committed
test(docs): add xlarge, the new breakpoint
1 parent 2857f6c commit 1c6bafb

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ import { BreakpointsProvider } from 'react-with-breakpoints';
6767
const breakpoints = {
6868
small: 468,
6969
medium: 768,
70-
large: 1024
70+
large: 1024,
71+
xlarge: Infinity,
7172
}
7273

7374
const myApp = () => (
@@ -82,7 +83,7 @@ As you can see in the example above, the `breakpoints` prop has been moved from
8283

8384
| Prop name | Type | Value | Default value | Description | Required |
8485
| --------- | ---- | ----- | ------------- | ----------- | -------- |
85-
| `breakpoints` | `Object` | `{ small: Number, medium: Number, large: Number }` | See it at [util/airbnbBreakpoints](util/airbnb-breakpoints.js): `{ small: 744, medium: 1128, large: Infinity }` | Here you can override the default Airbnb breakpoints. It needs to be an object with a strict shape, which is shown at the value row. | `false` |
86+
| `breakpoints` | `Object` | `{ small: Number, medium: Number, large: Number, xlarge: Number }` | See it at [util/airbnbBreakpoints](util/airbnb-breakpoints.js): `{ small: 744, medium: 1128, large: 1440, xlarge: Infinity }` | Here you can override the default Airbnb breakpoints. It needs to be an object with a strict shape, which is shown at the value row. | `false` |
8687

8788
### `<HideAt />`
8889

@@ -107,8 +108,8 @@ As HideAt and ShowAt function the same way (they do the opposite things of each
107108

108109
| Prop name | Type | Value | Default value | Description | Required |
109110
| --------- | ---- | ----- | ------------- | ----------- | -------- |
110-
| `breakpoint` | `String` | Either one of these: `'small'`, `'medium'`, `'mediumAndBelow'`, `'mediumAndAbove'`, `'large'` | - | You can set either one of the values to tell the component where to hide or show its children. | `true` |
111-
| `currentBreakpoint` | `String` | Either one of these: `'small'`, `'medium'`, `'large'` | - | It's used by withBreakpoints. Whenever there is a change with the breakpoints, the appropriate value will be passed down to HideAt or ShowAt. | `false` |
111+
| `breakpoint` | `String` | Either one of these: `'small'`, `'medium'`, `'mediumAndBelow'`, `'mediumAndAbove'`, `'large'`, `'xlarge'` | - | You can set either one of the values to tell the component where to hide or show its children. | `true` |
112+
| `currentBreakpoint` | `String` | Either one of these: `'small'`, `'medium'`, `'large'`, `'xlarge'` | - | It's used by withBreakpoints. Whenever there is a change with the breakpoints, the appropriate value will be passed down to HideAt or ShowAt. | `false` |
112113

113114
### `<ShowAt />`
114115

docs/sections/docs.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ class Docs extends React.PureComponent {
173173
<br />
174174
&nbsp;&nbsp;<BlueSyntax>medium</BlueSyntax>: 768,
175175
<br />
176-
&nbsp;&nbsp;<BlueSyntax>large</BlueSyntax>: 1024
176+
&nbsp;&nbsp;<BlueSyntax>large</BlueSyntax>: 1024,
177+
<br />
178+
&nbsp;&nbsp;<BlueSyntax>large</BlueSyntax>: Infinity,
177179
<br />
178180
}
179181
<br />
@@ -205,6 +207,8 @@ class Docs extends React.PureComponent {
205207
<br />
206208
&nbsp;&nbsp;<BlueSyntax>large</BlueSyntax>: Number
207209
<br />
210+
&nbsp;&nbsp;<BlueSyntax>xlarge</BlueSyntax>: Number
211+
<br />
208212
{'}'}
209213
</Code>
210214
</Row>
@@ -217,7 +221,9 @@ class Docs extends React.PureComponent {
217221
<br />
218222
&nbsp;&nbsp;<BlueSyntax>medium</BlueSyntax>: 1128
219223
<br />
220-
&nbsp;&nbsp;<BlueSyntax>large</BlueSyntax>: <Snippet>Infinity</Snippet>
224+
&nbsp;&nbsp;<BlueSyntax>large</BlueSyntax>: 1440
225+
<br />
226+
&nbsp;&nbsp;<BlueSyntax>xlarge</BlueSyntax>: <Snippet>Infinity</Snippet>
221227
<br />
222228
{'}'}
223229
</Code>
@@ -282,6 +288,7 @@ class Docs extends React.PureComponent {
282288
<Snippet>"small"</Snippet>
283289
<Snippet>"medium"</Snippet>
284290
<Snippet>"large"</Snippet>
291+
<Snippet>"xlarge"</Snippet>
285292
</div>
286293
</Row>
287294
<Row title="Description:">

0 commit comments

Comments
 (0)