Skip to content

Commit

Permalink
docs(Wrapper): added oneOfType property until imports are supported (r…
Browse files Browse the repository at this point in the history
  • Loading branch information
Utzel-Butzel committed Sep 6, 2020
1 parent 88e2e6a commit e0835c7
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .storybook/storybook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
}
.sbdocs-subtitle {
@extend .wfp--story__sub-title;
margin-top: 0;
}
.sbdocs-h2 {
border: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ BannerNavigationWithContent.propTypes = {
/**
* The CSS class name to be placed on the wrapping element.
*/
pageWidth: PropTypes.string,
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
/**
* Allows to disable the search input
*/
Expand Down
4 changes: 2 additions & 2 deletions src/components/BannerNavigation/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The BannerNavigation is used on internal applications which are actually listed

`BannerNavigationWithContent` will contain the default links.

```js
```jsx
import { BannerNavigationWithContent } from '@wfp/ui';

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

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

```js
```jsx
import { BannerNavigation } from '@wfp/ui';

<BannerNavigation>
Expand Down
2 changes: 1 addition & 1 deletion src/components/InfoBar/InfoBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ InfoBar.propTypes = {
/**
* `pageWidth` for the `<Wrapper />` component
*/
pageWidth: PropTypes.string,
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
/**
* Additional `className` for the `<Wrapper />` component
*/
Expand Down
2 changes: 1 addition & 1 deletion src/components/MainNavigation/MainNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ MainNavigation.propTypes = {
/**
* See `Wrapper` component for more information
*/
pageWidth: PropTypes.string,
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
/**
* See `Wrapper` component for more information
*/
Expand Down
2 changes: 1 addition & 1 deletion src/components/SecondaryNavigation/SecondaryNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SecondaryNavigation.propTypes = {
/**
* The width of the SecondaryNavigation (same as Wrapper)
*/
pageWidth: PropTypes.string,
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
wrapperClassName: PropTypes.string,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Wrapper/Wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Wrapper.propTypes = {
/**
`xs` `sm` `md` `lg`: Set the maximum width of the Wrapper content `xs`: `500px` `sm`: `700px` `md`:`1000px` `lg`: `1200px`
*/
pageWidth: PropTypes.string,
pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']),
/**
Width on mobile devices
*/
Expand Down

0 comments on commit e0835c7

Please sign in to comment.