Skip to content

Commit cde94df

Browse files
committed
chore(clerk-js): Keyless prompt content updates
1 parent 4a58c10 commit cde94df

1 file changed

Lines changed: 70 additions & 27 deletions

File tree

  • packages/clerk-js/src/ui/components/devPrompts/KeylessPrompt

packages/clerk-js/src/ui/components/devPrompts/KeylessPrompt/index.tsx

Lines changed: 70 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function withLastActiveFallback(cb: () => string): string {
4141

4242
const KeylessPromptInternal = (_props: KeylessPromptProps) => {
4343
const { isSignedIn } = useUser();
44-
const [isExpanded, setIsExpanded] = useState(false);
44+
const [isExpanded, setIsExpanded] = useState(true);
4545

4646
useEffect(() => {
4747
if (isSignedIn) {
@@ -83,7 +83,6 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
8383
justify-content: center;
8484
width: 100%;
8585
height: 1.75rem;
86-
max-width: 14.625rem;
8786
padding: 0.25rem 0.625rem;
8887
border-radius: 0.375rem;
8988
font-size: 0.75rem;
@@ -112,7 +111,7 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
112111
bottom: '1.25rem',
113112
right: '1.25rem',
114113
height: `${t.sizes.$10}`,
115-
minWidth: '13.4rem',
114+
minWidth: '15.5rem',
116115
paddingLeft: `${t.space.$3}`,
117116
borderRadius: '1.25rem',
118117
transition: 'all 195ms cubic-bezier(0.2, 0.61, 0.1, 1)',
@@ -125,10 +124,10 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
125124
flexDirection: 'column',
126125
alignItems: 'flex-center',
127126
justifyContent: 'flex-center',
128-
height: claimed || success ? 'fit-content' : isSignedIn ? '8.5rem' : '12rem',
127+
height: claimed || success ? 'fit-content' : isSignedIn ? '12rem' : '14.5rem',
129128
overflow: 'hidden',
130129
width: 'fit-content',
131-
minWidth: '16.125rem',
130+
minWidth: '18.5rem',
132131
gap: `${t.space.$1x5}`,
133132
padding: `${t.space.$2x5} ${t.space.$3} ${t.space.$3} ${t.space.$3}`,
134133
borderRadius: `${t.radii.$xl}`,
@@ -244,9 +243,15 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
244243
)}
245244

246245
<p
247-
data-text='Clerk is in keyless mode'
246+
data-text='Configure your application'
248247
aria-label={
249-
success ? 'Claim completed' : claimed ? 'Missing environment keys' : 'Clerk is in keyless mode'
248+
success
249+
? 'Your app is ready'
250+
: claimed
251+
? 'Missing environment keys'
252+
: isSignedIn
253+
? "You've created your first user"
254+
: 'Configure your application'
250255
}
251256
css={css`
252257
${basePromptElementStyles};
@@ -257,7 +262,13 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
257262
cursor: pointer;
258263
`}
259264
>
260-
{success ? 'Claim completed' : claimed ? 'Missing environment keys' : 'Clerk is in keyless mode'}
265+
{success
266+
? 'Your app is ready'
267+
: claimed
268+
? 'Missing environment keys'
269+
: isSignedIn
270+
? "You've created your first user"
271+
: 'Configure your application'}
261272
</p>
262273
</Flex>
263274

@@ -360,7 +371,7 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
360371
>
361372
{appName}
362373
</span>{' '}
363-
has been claimed. Configure settings from the{' '}
374+
has been configured. You may now customize your settings in the{' '}
364375
<Link
365376
isExternal
366377
aria-label='Go to Dashboard to configure settings'
@@ -374,8 +385,9 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
374385
},
375386
})}
376387
>
377-
Clerk Dashboard
388+
Clerk dashboard
378389
</Link>
390+
.
379391
</p>
380392
) : claimed ? (
381393
<p
@@ -391,20 +403,36 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
391403
Dashboard.
392404
</p>
393405
) : isSignedIn ? (
394-
<p
395-
css={css`
396-
${basePromptElementStyles};
397-
color: #b4b4b4;
398-
font-size: 0.8125rem;
399-
font-weight: 400;
400-
line-height: 1rem;
401-
`}
402-
>
403-
<span>
404-
You&apos;ve created your first user! Link this application to your Clerk account to explore the
405-
Dashboard.
406-
</span>
407-
</p>
406+
<>
407+
<p
408+
css={css`
409+
${basePromptElementStyles};
410+
color: #b4b4b4;
411+
font-size: 0.8125rem;
412+
font-weight: 400;
413+
line-height: 1rem;
414+
`}
415+
>
416+
Head to the dashboard to customize authentication settings, view user info, and explore more
417+
features.
418+
</p>
419+
<ul
420+
css={css`
421+
${basePromptElementStyles};
422+
color: #b4b4b4;
423+
font-size: 0.8125rem;
424+
font-weight: 400;
425+
line-height: 1rem;
426+
margin: 0;
427+
padding-left: 1.25rem;
428+
list-style: disc;
429+
`}
430+
>
431+
<li>Add SSO connections (eg. GitHub)</li>
432+
<li>Set up B2B authentication</li>
433+
<li>Enable MFA</li>
434+
</ul>
435+
</>
408436
) : (
409437
<>
410438
<p
@@ -419,6 +447,22 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
419447
>
420448
Temporary API keys are enabled so you can get started immediately.
421449
</p>
450+
<ul
451+
css={css`
452+
${basePromptElementStyles};
453+
color: #b4b4b4;
454+
font-size: 0.8125rem;
455+
font-weight: 400;
456+
line-height: 1rem;
457+
margin: 0;
458+
padding-left: 1.25rem;
459+
list-style: disc;
460+
`}
461+
>
462+
<li>Add SSO connections (eg. GitHub)</li>
463+
<li>Set up B2B authentication</li>
464+
<li>Enable MFA</li>
465+
</ul>
422466
<p
423467
css={css`
424468
${basePromptElementStyles};
@@ -429,8 +473,7 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
429473
text-wrap: pretty;
430474
`}
431475
>
432-
Claim this application to access the Clerk Dashboard where you can manage auth settings and explore
433-
more Clerk features.
476+
Access the dashboard to customize auth settings and explore Clerk features.
434477
</p>
435478
</>
436479
)}
@@ -501,7 +544,7 @@ const KeylessPromptInternal = (_props: KeylessPromptProps) => {
501544
}
502545
`}
503546
>
504-
{claimed ? 'Get API keys' : 'Claim application'}
547+
{claimed ? 'Get API keys' : 'Configure your application'}
505548
</a>
506549
</Flex>
507550
))}

0 commit comments

Comments
 (0)