You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disclaimer: Love this project, combined with reg-suit, it's amazing.
It would be very nice if during the execution of storybook-chrome-screenshot, the withScreenshot decorator would pass a boolean to the story, which can be used to determine properties to pass to your components. An example would be if I were using the material UI tooltip in some of my UI, and I wanted it to be open in the screenshot pass, but not when I normally use storybook.
storiesOf('SomeComponent',module).add('this one is showing tooltips open',withScreenshot()(props=>(<Tooltipopen={props.isScreenshot}title="Can't do that now"><Button>Disabled</Button></Tooltip>))
The text was updated successfully, but these errors were encountered:
I added the function isScreenshot to get whether the current process is in the screenshot browser:
import{isScreenshot}from'storycap';storiesOf('SomeComponent',module).add('this one is showing tooltips open',withScreenshot()(props=>(<Tooltipopen={isScreenshot()}title="Can't do that now"><Button>Disabled</Button></Tooltip>))
It would be very nice if during the execution of
storybook-chrome-screenshot
, thewithScreenshot
decorator would pass a boolean to the story, which can be used to determine properties to pass to your components. An example would be if I were using the material UI tooltip in some of my UI, and I wanted it to be open in the screenshot pass, but not when I normally use storybook.The text was updated successfully, but these errors were encountered: