diff --git a/src/stories/Button.stories.tsx b/src/stories/Button.stories.tsx index 1805d8c0715..1618abadd12 100644 --- a/src/stories/Button.stories.tsx +++ b/src/stories/Button.stories.tsx @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import React from 'react' import {Meta} from '@storybook/react' +import {ThemeProvider} from 'styled-components' import { BaseStyles, @@ -11,7 +12,8 @@ import { ButtonInvisible, ButtonOutline, ButtonPrimary, - ButtonTableList + ButtonTableList, + theme } from '..' import {ButtonStyleProps} from 'styled-system' import {ButtonBaseProps} from '../Button/ButtonBase' @@ -23,9 +25,11 @@ export default { decorators: [ Story => { return ( - - - + + + + + ) } ], diff --git a/src/stories/Portal.stories.tsx b/src/stories/Portal.stories.tsx index 8bf513df796..09d27816444 100644 --- a/src/stories/Portal.stories.tsx +++ b/src/stories/Portal.stories.tsx @@ -1,8 +1,9 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import React from 'react' import {Meta} from '@storybook/react' +import {ThemeProvider} from 'styled-components' -import {BaseStyles, Box} from '..' +import {BaseStyles, Box, theme} from '..' import Portal, {registerPortalRoot} from '../Portal' export default { @@ -14,9 +15,11 @@ export default { // story works in isolation. registerPortalRoot(undefined) return ( - - - + + + + + ) } ] diff --git a/src/stories/useAnchoredPosition.stories.tsx b/src/stories/useAnchoredPosition.stories.tsx index 1cd21b7a41a..5d6ec80b75c 100644 --- a/src/stories/useAnchoredPosition.stories.tsx +++ b/src/stories/useAnchoredPosition.stories.tsx @@ -2,9 +2,9 @@ import React from 'react' import {Meta} from '@storybook/react' -import {BaseStyles, Box, ButtonPrimary, Position} from '..' +import {BaseStyles, Box, ButtonPrimary, Position, theme} from '..' import {useAnchoredPosition} from '../hooks/useAnchoredPosition' -import styled from 'styled-components' +import styled, {ThemeProvider} from 'styled-components' import {get} from '../constants' import {AnchorSide} from '../behaviors/anchoredPosition' import Portal, {registerPortalRoot} from '../Portal' @@ -15,7 +15,11 @@ export default { // Note: For some reason, if you use , // the component gets unmounted from the root every time a control changes! Story => { - return {Story()} + return ( + + {Story()} + + ) } ], argTypes: { @@ -229,7 +233,7 @@ export const WithPortal = () => { left={position?.left ?? 0} width={250} height={400} - sx={{visibility: position ? "visible" : "hidden"}} + sx={{visibility: position ? 'visible' : 'hidden'}} > An un-constrained overlay! @@ -239,7 +243,9 @@ export const WithPortal = () => { The body! - Note: The controls below have no effect in this story. + + Note: The controls below have no effect in this story. + )
Note: The controls below have no effect in this story.
+ Note: The controls below have no effect in this story. +