From 4260611eefda20e8cee603f1886a1bf0a4607fed Mon Sep 17 00:00:00 2001 From: Meryem Kaftar Date: Thu, 9 Jan 2025 00:07:02 +0300 Subject: [PATCH] fix(clerk-js): Keyless toast's collapse behavior (#4855) Co-authored-by: panteliselef --- .changeset/shaggy-otters-hug.md | 5 +++++ .../src/ui/components/KeylessPrompt/index.tsx | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 .changeset/shaggy-otters-hug.md diff --git a/.changeset/shaggy-otters-hug.md b/.changeset/shaggy-otters-hug.md new file mode 100644 index 0000000000..679f6a13a8 --- /dev/null +++ b/.changeset/shaggy-otters-hug.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Updates Keyless UI to automatically expand when the application has been claimed. diff --git a/packages/clerk-js/src/ui/components/KeylessPrompt/index.tsx b/packages/clerk-js/src/ui/components/KeylessPrompt/index.tsx index bfc68e4149..b36262632b 100644 --- a/packages/clerk-js/src/ui/components/KeylessPrompt/index.tsx +++ b/packages/clerk-js/src/ui/components/KeylessPrompt/index.tsx @@ -24,10 +24,12 @@ const _KeylessPrompt = (_props: KeylessPromptProps) => { const [isExpanded, setIsExpanded] = useState(true); const claimed = Boolean(useRevalidateEnvironment().authConfig.claimedAt); + const isForcedExpanded = claimed || isExpanded; + return ( ({ position: 'fixed', @@ -61,7 +63,7 @@ const _KeylessPrompt = (_props: KeylessPromptProps) => { >