From e0835c7235dd0304a79735f9b849049f64e37de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Gu=CC=88hne?= Date: Sun, 6 Sep 2020 20:05:30 +0200 Subject: [PATCH] docs(Wrapper): added oneOfType property until imports are supported (https://github.com/reactjs/react-docgen/pull/352) --- .storybook/storybook.scss | 1 + .../BannerNavigation/BannerNavigationWithContent.js | 2 +- src/components/BannerNavigation/README.mdx | 4 ++-- src/components/InfoBar/InfoBar.js | 2 +- src/components/MainNavigation/MainNavigation.js | 2 +- src/components/SecondaryNavigation/SecondaryNavigation.js | 2 +- src/components/Wrapper/Wrapper.js | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.storybook/storybook.scss b/.storybook/storybook.scss index f24a10781..e5173b013 100644 --- a/.storybook/storybook.scss +++ b/.storybook/storybook.scss @@ -36,6 +36,7 @@ } .sbdocs-subtitle { @extend .wfp--story__sub-title; + margin-top: 0; } .sbdocs-h2 { border: none; diff --git a/src/components/BannerNavigation/BannerNavigationWithContent.js b/src/components/BannerNavigation/BannerNavigationWithContent.js index 69d0a0650..9255c5046 100644 --- a/src/components/BannerNavigation/BannerNavigationWithContent.js +++ b/src/components/BannerNavigation/BannerNavigationWithContent.js @@ -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 */ diff --git a/src/components/BannerNavigation/README.mdx b/src/components/BannerNavigation/README.mdx index 0f6c42519..febbbf257 100644 --- a/src/components/BannerNavigation/README.mdx +++ b/src/components/BannerNavigation/README.mdx @@ -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'; ; @@ -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'; diff --git a/src/components/InfoBar/InfoBar.js b/src/components/InfoBar/InfoBar.js index 0df1f378f..53f4abd72 100644 --- a/src/components/InfoBar/InfoBar.js +++ b/src/components/InfoBar/InfoBar.js @@ -26,7 +26,7 @@ InfoBar.propTypes = { /** * `pageWidth` for the `` component */ - pageWidth: PropTypes.string, + pageWidth: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'full']), /** * Additional `className` for the `` component */ diff --git a/src/components/MainNavigation/MainNavigation.js b/src/components/MainNavigation/MainNavigation.js index d4a115e92..e23354094 100644 --- a/src/components/MainNavigation/MainNavigation.js +++ b/src/components/MainNavigation/MainNavigation.js @@ -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 */ diff --git a/src/components/SecondaryNavigation/SecondaryNavigation.js b/src/components/SecondaryNavigation/SecondaryNavigation.js index 0ecd48550..7afabe598 100644 --- a/src/components/SecondaryNavigation/SecondaryNavigation.js +++ b/src/components/SecondaryNavigation/SecondaryNavigation.js @@ -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, }; diff --git a/src/components/Wrapper/Wrapper.js b/src/components/Wrapper/Wrapper.js index 8bf03736f..b4e31a87d 100644 --- a/src/components/Wrapper/Wrapper.js +++ b/src/components/Wrapper/Wrapper.js @@ -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 */