Skip to content

Commit 761ebdd

Browse files
fix(ui): Configure SSO copy button loading state (#8592)
1 parent 6eaf4d6 commit 761ebdd

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

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 layout shift when Copy test URL button enters loading state in `<ConfigureSSO />`

packages/ui/src/components/ConfigureSSO/steps/TestConfigurationStep.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,6 @@ type CopyTestUrlButtonProps = {
708708
};
709709

710710
const CopyTestUrlButton = ({ onTestRunCreated }: CopyTestUrlButtonProps): JSX.Element => {
711-
const { t } = useLocalizations();
712711
const { user } = useUser();
713712
const card = useCardState();
714713
const { enterpriseConnection } = useConfigureSSO();
@@ -743,17 +742,22 @@ const CopyTestUrlButton = ({ onTestRunCreated }: CopyTestUrlButtonProps): JSX.El
743742
size='xs'
744743
onClick={createTestRun}
745744
isDisabled={isCreatingTestRun}
746-
isLoading={isCreatingTestRun}
747-
loadingText={t(localizationKeys('configureSSO.testConfigurationStep.testUrl.actionLabel__copy'))}
748745
sx={t => ({
749746
gap: t.space.$1x5,
750747
})}
751748
>
752-
<Icon
753-
icon={hasCopied ? Check : Copy}
754-
size='sm'
755-
colorScheme='neutral'
756-
/>
749+
{isCreatingTestRun ? (
750+
<Spinner
751+
elementDescriptor={descriptors.spinner}
752+
size='xs'
753+
/>
754+
) : (
755+
<Icon
756+
icon={hasCopied ? Check : Copy}
757+
size='sm'
758+
colorScheme='neutral'
759+
/>
760+
)}
757761
<Text
758762
as='span'
759763
localizationKey={localizationKeys('configureSSO.testConfigurationStep.testUrl.actionLabel__copy')}

0 commit comments

Comments
 (0)