Skip to content

Commit 2ddaed5

Browse files
authored
fix(ui): stack ConfigureSSO header and drop step separators on mobile (#8984)
1 parent af0eb3f commit 2ddaed5

4 files changed

Lines changed: 18 additions & 3 deletions

File tree

.changeset/tricky-spoons-matter.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/ui': patch
3+
---
4+
5+
Fix the `<ConfigureSSO />` wizard header on small screens: the back link now stacks above the step indicators and the step separators are hidden, so the steps no longer wrap onto a second line.

packages/ui/src/components/ConfigureSSO/ConfigureSSOHeader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Flex, useLocalizations } from '@/customizables';
2+
import { mqu } from '@/styledSystem';
23

34
import { ProfileCardHeader } from './elements/ProfileCard';
45
import { Stepper } from './elements/Stepper';
@@ -21,7 +22,7 @@ export const ConfigureSSOHeader = ({ title }: ConfigureSSOHeaderProps): JSX.Elem
2122
<ProfileCardHeader>
2223
{title}
2324

24-
<Flex sx={title ? { marginInlineStart: 'auto' } : undefined}>
25+
<Flex sx={title ? { marginInlineStart: 'auto', [mqu.md]: { marginInlineStart: 0 } } : undefined}>
2526
<Stepper>
2627
{visibleSteps.map((step, index) => {
2728
const isCurrent = index === currentVisibleIndex;

packages/ui/src/components/ConfigureSSO/elements/ProfileCard.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { descriptors, Flex } from '@/customizables';
2-
import { common } from '@/styledSystem';
2+
import { common, mqu } from '@/styledSystem';
33

44
type ProfileCardHeaderProps = React.PropsWithChildren;
55

@@ -16,6 +16,11 @@ export const ProfileCardHeader = (props: ProfileCardHeaderProps): JSX.Element =>
1616
borderBottomWidth: theme.borderWidths.$normal,
1717
borderBottomStyle: theme.borderStyles.$solid,
1818
borderBottomColor: theme.colors.$borderAlpha100,
19+
[mqu.md]: {
20+
flexDirection: 'column',
21+
alignItems: 'flex-start',
22+
gap: theme.space.$4,
23+
},
1924
})}
2025
/>
2126
);

packages/ui/src/components/ConfigureSSO/elements/Stepper/Stepper.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22

33
import { Box, descriptors, Flex, Icon, SimpleButton, Span, Text } from '@/customizables';
44
import { Checkmark, ChevronRight } from '@/icons';
5+
import { mqu } from '@/styledSystem';
56

67
import type { StepperItemProps, StepperProps } from './types';
78

@@ -15,6 +16,7 @@ const Root = ({ children }: StepperProps): JSX.Element => {
1516
sx={theme => ({
1617
gap: theme.space.$2,
1718
flexWrap: 'wrap',
19+
[mqu.md]: { gap: theme.space.$3 },
1820
})}
1921
>
2022
{items.map((child, index) => (
@@ -34,6 +36,7 @@ const Root = ({ children }: StepperProps): JSX.Element => {
3436
icon={ChevronRight}
3537
size='md'
3638
colorScheme='neutral'
39+
sx={{ [mqu.md]: { display: 'none' } }}
3740
/>
3841
)}
3942
</Span>
@@ -127,6 +130,7 @@ const Skeleton = ({ totalSteps = 4 }: SkeletonProps): JSX.Element => (
127130
sx={theme => ({
128131
gap: theme.space.$2,
129132
flexWrap: 'wrap',
133+
[mqu.md]: { gap: theme.space.$3 },
130134
})}
131135
>
132136
{Array.from({ length: totalSteps }).map((_, index) => (
@@ -139,7 +143,7 @@ const Skeleton = ({ totalSteps = 4 }: SkeletonProps): JSX.Element => (
139143
icon={ChevronRight}
140144
size='md'
141145
colorScheme='neutral'
142-
sx={{ opacity: 0.16 }}
146+
sx={{ opacity: 0.16, [mqu.md]: { display: 'none' } }}
143147
/>
144148
)}
145149
</React.Fragment>

0 commit comments

Comments
 (0)