Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #82 from storybookjs/norbert/fix-z-index
Browse files Browse the repository at this point in the history
Fix z-index bug by adding a wrapper
  • Loading branch information
yannbf authored Jan 23, 2024
2 parents b82da02 + 870db45 commit 08ed7fc
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions src/features/WelcomeModal/WelcomeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,33 @@ export const WelcomeModal: FC<WelcomeModalProps> = ({
skipOnboarding,
}) => {
return (
<Modal width={540} height={430} defaultOpen>
{({ Close }) => (
<ModalContentWrapper data-chromatic="ignore">
<TopContent>
<StorybookLogo />
<Title>Welcome to Storybook</Title>
<Description>
Storybook helps you develop UI components faster. Learn the basics in a
few simple steps.
</Description>
<Button style={{ marginTop: 4 }} onClick={onProceed}>
Start your 3 minute tour
</Button>
</TopContent>
<SkipButton onClick={skipOnboarding}>
Skip tour
<StyledIcon icon="arrowright" />
</SkipButton>
<Background>
<Circle1 />
<Circle2 />
<Circle3 />
</Background>
</ModalContentWrapper>
)}
</Modal>
<div style={{ zIndex: 10 }}>
<Modal width={540} height={430} defaultOpen>
{({ Close }) => (
<ModalContentWrapper data-chromatic="ignore">
<TopContent>
<StorybookLogo />
<Title>Welcome to Storybook</Title>
<Description>
Storybook helps you develop UI components faster. Learn the
basics in a few simple steps.
</Description>
<Button style={{ marginTop: 4 }} onClick={onProceed}>
Start your 3 minute tour
</Button>
</TopContent>
<SkipButton onClick={skipOnboarding}>
Skip tour
<StyledIcon icon="arrowright" />
</SkipButton>
<Background>
<Circle1 />
<Circle2 />
<Circle3 />
</Background>
</ModalContentWrapper>
)}
</Modal>
</div>
);
};

0 comments on commit 08ed7fc

Please sign in to comment.