-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): update storybook monorepo to ^7.6.8 (#4389)
* chore(deps): update storybook monorepo to ^7.6.8 * docs: fix decorator types --------- Co-authored-by: Self-hosted Renovate Bot <135776+cultureamp-renovate[bot]@users.noreply.github.com> Co-authored-by: Cassandra Tam <[email protected]>
- Loading branch information
1 parent
001d085
commit dd8b37f
Showing
8 changed files
with
570 additions
and
861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 3 additions & 29 deletions
32
packages/components/src/Modal/ConfirmationModal/_docs/ConfirmationModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 3 additions & 29 deletions
32
packages/components/src/Modal/ContextModal/_docs/ContextModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 3 additions & 29 deletions
32
packages/components/src/Modal/InputEditModal/_docs/InputEditModal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from "react" | ||
import { 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 ( | ||
<div style={{ minHeight: "100vh" }}> | ||
<Story /> | ||
</div> | ||
) | ||
} | ||
|
||
return <Story /> | ||
} | ||
|
||
export const chromaticModalSettings = { | ||
parameters: { | ||
chromatic: { | ||
disable: false, | ||
delay: 400, // match MODAL_TRANSITION_TIMEOUT in modals + 50ms | ||
pauseAnimationAtEnd: true, | ||
}, | ||
}, | ||
decorators: [heightDecorator], | ||
} |
Oops, something went wrong.