withRightAlignedStory.tsx 505 B

1234567891011121314151617181920
  1. import React from 'react';
  2. import { RenderFunction } from '@storybook/react';
  3. const RightAlignedStory: React.FunctionComponent<{}> = ({ children }) => {
  4. return (
  5. <div
  6. style={{
  7. height: '100vh ',
  8. display: 'flex',
  9. alignItems: 'flex-start',
  10. justifyContent: 'flex-end',
  11. marginRight: '20px',
  12. }}
  13. >
  14. {children}
  15. </div>
  16. );
  17. };
  18. export const withRighAlignedStory = (story: RenderFunction) => <RightAlignedStory>{story()}</RightAlignedStory>;