From 810b59089b07ebb077c53756205a92c399caf755 Mon Sep 17 00:00:00 2001 From: Vlad Moroz Date: Tue, 4 Jun 2024 18:27:24 +0200 Subject: [PATCH] Another attempt at Chromatic/Storybook portals --- packages/react/select/src/Select.stories.tsx | 72 +++++++++++--------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/packages/react/select/src/Select.stories.tsx b/packages/react/select/src/Select.stories.tsx index a80aeeac03..3575b01b04 100644 --- a/packages/react/select/src/Select.stories.tsx +++ b/packages/react/select/src/Select.stories.tsx @@ -9,6 +9,10 @@ export default { title: 'Components/Select' }; const POSITIONS = ['item-aligned', 'popper'] as const; +const SelectPortal = (props: React.ComponentPropsWithoutRef) => ( + +); + export const Styled = () => (
{POSITIONS.map((position) => ( @@ -19,7 +23,7 @@ export const Styled = () => ( - + @@ -49,7 +53,7 @@ export const Styled = () => ( - + ))} @@ -80,7 +84,7 @@ export const Controlled = () => { - + @@ -110,7 +114,7 @@ export const Controlled = () => { - + ))} @@ -137,7 +141,7 @@ export const Position = () => ( - + @@ -163,7 +167,7 @@ export const Position = () => ( - + ))} @@ -188,7 +192,7 @@ export const NoDefaultValue = () => ( - + @@ -212,7 +216,7 @@ export const NoDefaultValue = () => ( - + ))} @@ -237,7 +241,7 @@ export const Typeahead = () => ( - + @@ -257,7 +261,7 @@ export const Typeahead = () => ( - + ))} @@ -282,7 +286,7 @@ export const WithGroups = () => ( - + @@ -321,7 +325,7 @@ export const WithGroups = () => ( - + ))} @@ -330,7 +334,7 @@ export const WithGroups = () => ( export const Labelling = () => { const content = ( - + @@ -353,7 +357,7 @@ export const Labelling = () => { - + ); return (
@@ -411,7 +415,7 @@ export const RightToLeft = () => ( - + @@ -441,7 +445,7 @@ export const RightToLeft = () => ( - + ))} @@ -477,7 +481,7 @@ export const WithinForm = () => { - + @@ -500,7 +504,7 @@ export const WithinForm = () => { - +
@@ -540,7 +544,7 @@ export const DisabledWithinForm = () => { - + @@ -563,7 +567,7 @@ export const DisabledWithinForm = () => { - +
@@ -603,7 +607,7 @@ export const RequiredWithinForm = () => { - + @@ -626,7 +630,7 @@ export const RequiredWithinForm = () => { - +
@@ -652,7 +656,7 @@ export const WithinDialog = () => ( - + @@ -669,7 +673,7 @@ export const WithinDialog = () => ( ▼ - + Close Dialog @@ -733,7 +737,7 @@ export const ChromaticNoDefaultValue = () => ( - + @@ -748,7 +752,7 @@ export const ChromaticNoDefaultValue = () => ( - + @@ -756,7 +760,7 @@ export const ChromaticNoDefaultValue = () => ( - + @@ -771,7 +775,7 @@ export const ChromaticNoDefaultValue = () => ( - +
); @@ -803,7 +807,7 @@ export const Cypress = () => { - + @@ -826,7 +830,7 @@ export const Cypress = () => { - + @@ -843,7 +847,7 @@ export const Cypress = () => { - + @@ -872,7 +876,7 @@ export const Cypress = () => { - + @@ -901,7 +905,7 @@ const ChromaticSelect = React.forwardRef< - + - + ));