import React from 'react' import { type Decorator } from '@storybook/react' import isChromatic from 'chromatic' const IS_CHROMATIC = isChromatic() // Add additional height to the stories when running in Chromatic only. // Modals have fixed position and would be cropped from snapshot tests. // Setting height to 100vh ensures we capture as much content of the // modal, as it's height responds to the content within it. const heightDecorator: Decorator = (Story) => { if (IS_CHROMATIC) { return (