diff --git a/CHANGELOG.md b/CHANGELOG.md index 9023b441..c52340fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2019-XX-XX +- [add] `rawOnly` flag for Styleguide examples using fixed positioning or full-page dimensions. + [#1094](https://github.com/sharetribe/flex-template-web/pull/1094) - [fix] Show error when typing credit card number if e.g. the number is invalid. Fixes bug that was introduced in PR #1088. [#1092](https://github.com/sharetribe/flex-template-web/pull/1092) - [change] Use Final Form on `StripePaymentForm` for consistency. Note that card form Stripe diff --git a/src/components/ImageCarousel/ImageCarousel.example.css b/src/components/ImageCarousel/ImageCarousel.example.css deleted file mode 100644 index a4187e9e..00000000 --- a/src/components/ImageCarousel/ImageCarousel.example.css +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../marketplace.css'; - -.root { - position: relative; - width: 100%; - height: 100%; - padding: 0; - - @media (--viewportMedium) { - padding: 100px 10vw; - } -} diff --git a/src/components/ImageCarousel/ImageCarousel.example.js b/src/components/ImageCarousel/ImageCarousel.example.js index 3831dd8e..a11bc9e3 100644 --- a/src/components/ImageCarousel/ImageCarousel.example.js +++ b/src/components/ImageCarousel/ImageCarousel.example.js @@ -1,7 +1,6 @@ import React from 'react'; import { types as sdkTypes } from '../../util/sdkLoader'; import ImageCarousel from './ImageCarousel'; -import css from './ImageCarousel.example.css'; const { UUID } = sdkTypes; @@ -110,8 +109,6 @@ const imageLandscape = { const ImageCarouselWrapper = props => { const wrapperStyles = { - width: '100%', - height: 400, backgroundColor: '#000', }; return ( @@ -123,15 +120,18 @@ const ImageCarouselWrapper = props => { export const NoImages = { component: ImageCarouselWrapper, - props: { images: [], rootClassName: css.root }, + props: { images: [] }, + rawOnly: true, }; export const SingleImage = { component: ImageCarouselWrapper, - props: { images: [imageSquare], rootClassName: css.root }, + props: { images: [imageSquare] }, + rawOnly: true, }; export const MultipleImages = { component: ImageCarouselWrapper, - props: { images: [imageLandscape, imagePortrait, imageSquare], rootClassName: css.root }, + props: { images: [imageLandscape, imagePortrait, imageSquare] }, + rawOnly: true, }; diff --git a/src/containers/StyleguidePage/StyleguidePage.js b/src/containers/StyleguidePage/StyleguidePage.js index 510f6045..a68673a3 100644 --- a/src/containers/StyleguidePage/StyleguidePage.js +++ b/src/containers/StyleguidePage/StyleguidePage.js @@ -17,6 +17,7 @@ const Example = props => { description, props: exampleProps, useDefaultWrapperStyles, + rawOnly, } = props; const exampleWrapperClassName = useDefaultWrapperStyles ? css.defaultWrapperStyles : ''; @@ -51,7 +52,20 @@ const Example = props => { {desc}
- + {rawOnly ? ( +

+ This component is available in{' '} + + raw mode + {' '} + only. +

+ ) : ( + + )}
);