dynamicWrapper.stories.js 624 B

1234567891011121314151617181920
  1. import React from 'react';
  2. import {storiesOf} from '@storybook/react';
  3. import {withInfo} from '@storybook/addon-info';
  4. import DynamicWrapper from 'app/components/dynamicWrapper';
  5. storiesOf('Utility|DynamicWrapper', module).add(
  6. 'DynamicWrapper',
  7. withInfo(
  8. `
  9. Use this to wrap dynamic content (i.e. dates) for acceptance/snapshot tests.
  10. Currently checks for existance of PERCY_TOKEN env var.
  11. (storybook webpack config has webpack.DefinePlugin for "process.env.IS_PERCY")
  12. `
  13. )(() => {
  14. return (
  15. <DynamicWrapper fixed="Fixed Content" value="Pretend this is a dynamic value" />
  16. );
  17. })
  18. );