Skip to content

Commit e0835c7

Browse files
committed
docs(Wrapper): added oneOfType property until imports are supported (reactjs/react-docgen#352)
1 parent 88e2e6a commit e0835c7

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

.storybook/storybook.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
}
3737
.sbdocs-subtitle {
3838
@extend .wfp--story__sub-title;
39+
margin-top: 0;
3940
}
4041
.sbdocs-h2 {
4142
border: none;

src/components/BannerNavigation/BannerNavigationWithContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ BannerNavigationWithContent.propTypes = {
7676
/**
7777
* The CSS class name to be placed on the wrapping element.
7878
*/
79-
pageWidth: PropTypes.string,
79+
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
8080
/**
8181
* Allows to disable the search input
8282
*/

src/components/BannerNavigation/README.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The BannerNavigation is used on internal applications which are actually listed
44

55
`BannerNavigationWithContent` will contain the default links.
66

7-
```js
7+
```jsx
88
import { BannerNavigationWithContent } from '@wfp/ui';
99

1010
<BannerNavigationWithContent pageWidth="narrow" />;
@@ -14,7 +14,7 @@ import { BannerNavigationWithContent } from '@wfp/ui';
1414

1515
`BannerNavigation` allows you to use custom `BannerNavigationItem` components inside.
1616

17-
```js
17+
```jsx
1818
import { BannerNavigation } from '@wfp/ui';
1919

2020
<BannerNavigation>

src/components/InfoBar/InfoBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ InfoBar.propTypes = {
2626
/**
2727
* `pageWidth` for the `<Wrapper />` component
2828
*/
29-
pageWidth: PropTypes.string,
29+
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
3030
/**
3131
* Additional `className` for the `<Wrapper />` component
3232
*/

src/components/MainNavigation/MainNavigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ MainNavigation.propTypes = {
127127
/**
128128
* See `Wrapper` component for more information
129129
*/
130-
pageWidth: PropTypes.string,
130+
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
131131
/**
132132
* See `Wrapper` component for more information
133133
*/

src/components/SecondaryNavigation/SecondaryNavigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ SecondaryNavigation.propTypes = {
5757
/**
5858
* The width of the SecondaryNavigation (same as Wrapper)
5959
*/
60-
pageWidth: PropTypes.string,
60+
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
6161
wrapperClassName: PropTypes.string,
6262
};
6363

src/components/Wrapper/Wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Wrapper.propTypes = {
6060
/**
6161
`xs` `sm` `md` `lg`: Set the maximum width of the Wrapper content `xs`: `500px` `sm`: `700px` `md`:`1000px` `lg`: `1200px`
6262
*/
63-
pageWidth: PropTypes.string,
63+
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
6464
/**
6565
Width on mobile devices
6666
*/

0 commit comments

Comments
 (0)