Skip to content

Commit 4cbd18c

Browse files
refactor(ui): Remove branding
1 parent 902d60a commit 4cbd18c

5 files changed

Lines changed: 26 additions & 20 deletions

File tree

‎packages/swingset/src/stories/flow.component.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Keep `Card.Root` outside `Flow.Root` so the card remains stable while Flow clips
1919
import { Card } from '@clerk/ui/mosaic/components/card';
2020
import { Flow } from '@clerk/ui/mosaic/components/flow';
2121

22-
<Card.Root>
22+
<Card.Root renderBranding={false}>
2323
<Flow.Root
2424
value={model.status}
2525
direction={model.direction}

‎packages/swingset/src/stories/flow.component.stories.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function Default(): JSX.Element {
2323
};
2424

2525
return (
26-
<Card.Root>
26+
<Card.Root renderBranding={false}>
2727
<Flow.Root
2828
value={step}
2929
direction={direction}

‎packages/swingset/src/stories/reverification.stories.tsx‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export function Password(): JSX.Element {
260260
const [value, setValue] = useState('');
261261

262262
return (
263-
<Card.Root>
263+
<Card.Root renderBranding={false}>
264264
<ReverificationPassword
265265
messages={passwordMessages}
266266
value={value}
@@ -274,7 +274,7 @@ export function Password(): JSX.Element {
274274

275275
export function PasswordPending(): JSX.Element {
276276
return (
277-
<Card.Root>
277+
<Card.Root renderBranding={false}>
278278
<ReverificationPassword
279279
messages={passwordMessages}
280280
value=''
@@ -289,7 +289,7 @@ export function PasswordPending(): JSX.Element {
289289

290290
export function PasswordError(): JSX.Element {
291291
return (
292-
<Card.Root>
292+
<Card.Root renderBranding={false}>
293293
<ReverificationPassword
294294
messages={passwordMessages}
295295
value='incorrect-password'
@@ -304,7 +304,7 @@ export function PasswordError(): JSX.Element {
304304

305305
export function Passkey(): JSX.Element {
306306
return (
307-
<Card.Root>
307+
<Card.Root renderBranding={false}>
308308
<ReverificationPasskey
309309
messages={passkeyMessages}
310310
onVerify={() => undefined}
@@ -316,7 +316,7 @@ export function Passkey(): JSX.Element {
316316

317317
export function PasskeyPending(): JSX.Element {
318318
return (
319-
<Card.Root>
319+
<Card.Root renderBranding={false}>
320320
<ReverificationPasskey
321321
messages={passkeyMessages}
322322
isPending
@@ -329,7 +329,7 @@ export function PasskeyPending(): JSX.Element {
329329

330330
export function PasskeyError(): JSX.Element {
331331
return (
332-
<Card.Root>
332+
<Card.Root renderBranding={false}>
333333
<ReverificationPasskey
334334
messages={passkeyMessages}
335335
errorMessage='We couldn’t verify that passkey. Try again.'
@@ -344,7 +344,7 @@ export function OTP(): JSX.Element {
344344
const [value, setValue] = useState('');
345345

346346
return (
347-
<Card.Root>
347+
<Card.Root renderBranding={false}>
348348
<ReverificationOTP
349349
messages={phoneOtpMessages}
350350
value={value}
@@ -364,7 +364,7 @@ export function AuthenticatorOTP(): JSX.Element {
364364
const [value, setValue] = useState('');
365365

366366
return (
367-
<Card.Root>
367+
<Card.Root renderBranding={false}>
368368
<ReverificationOTP
369369
messages={authenticatorOtpMessages}
370370
value={value}
@@ -378,7 +378,7 @@ export function AuthenticatorOTP(): JSX.Element {
378378

379379
export function OTPPending(): JSX.Element {
380380
return (
381-
<Card.Root>
381+
<Card.Root renderBranding={false}>
382382
<ReverificationOTP
383383
messages={phoneOtpMessages}
384384
value='123456'
@@ -398,7 +398,7 @@ export function OTPPending(): JSX.Element {
398398

399399
export function OTPError(): JSX.Element {
400400
return (
401-
<Card.Root>
401+
<Card.Root renderBranding={false}>
402402
<ReverificationOTP
403403
messages={phoneOtpMessages}
404404
value='123456'
@@ -417,7 +417,7 @@ export function OTPError(): JSX.Element {
417417

418418
export function OTPResending(): JSX.Element {
419419
return (
420-
<Card.Root>
420+
<Card.Root renderBranding={false}>
421421
<ReverificationOTP
422422
messages={phoneOtpMessages}
423423
value=''
@@ -438,7 +438,7 @@ export function BackupCode(): JSX.Element {
438438
const [value, setValue] = useState('');
439439

440440
return (
441-
<Card.Root>
441+
<Card.Root renderBranding={false}>
442442
<ReverificationBackupCode
443443
messages={backupCodeMessages}
444444
value={value}
@@ -452,7 +452,7 @@ export function BackupCode(): JSX.Element {
452452

453453
export function BackupCodePending(): JSX.Element {
454454
return (
455-
<Card.Root>
455+
<Card.Root renderBranding={false}>
456456
<ReverificationBackupCode
457457
messages={backupCodeMessages}
458458
value=''
@@ -467,7 +467,7 @@ export function BackupCodePending(): JSX.Element {
467467

468468
export function BackupCodeError(): JSX.Element {
469469
return (
470-
<Card.Root>
470+
<Card.Root renderBranding={false}>
471471
<ReverificationBackupCode
472472
messages={backupCodeMessages}
473473
value='invalid-code'
@@ -484,7 +484,7 @@ export function MethodPicker(): JSX.Element {
484484
const [pendingMethodId, setPendingMethodId] = useState<string>();
485485

486486
return (
487-
<Card.Root>
487+
<Card.Root renderBranding={false}>
488488
<ReverificationMethodPicker
489489
messages={methodPickerMessages}
490490
methods={[
@@ -504,7 +504,7 @@ export function MethodPicker(): JSX.Element {
504504

505505
export function MethodPickerPending(): JSX.Element {
506506
return (
507-
<Card.Root>
507+
<Card.Root renderBranding={false}>
508508
<ReverificationMethodPicker
509509
messages={methodPickerMessages}
510510
methods={[
@@ -524,7 +524,7 @@ export function MethodPickerPending(): JSX.Element {
524524

525525
export function Help(): JSX.Element {
526526
return (
527-
<Card.Root>
527+
<Card.Root renderBranding={false}>
528528
<ReverificationHelp
529529
messages={helpMessages}
530530
onEmailSupport={() => undefined}

‎packages/ui/src/mosaic/blocks/reverification/reverification.test.tsx‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ describe('Reverification', () => {
117117
expect(otpStep?.style.getPropertyValue('--cl-flow-transition-direction')).toBe('-1');
118118
});
119119

120+
it('does not render Card branding', () => {
121+
render(<Reverification {...model('password')} />);
122+
123+
expect(screen.queryByText('Secured by')).not.toBeInTheDocument();
124+
});
125+
120126
it('renders a passkey attempt error in a negative Banner', () => {
121127
const errorModel = model('passkey');
122128
errorModel.passkey.errorMessage = 'We couldn’t verify that passkey. Try again.';

‎packages/ui/src/mosaic/blocks/reverification/reverification.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export type ReverificationProps = ReverificationModel;
3232

3333
export function Reverification(model: ReverificationProps): JSX.Element {
3434
return (
35-
<Card.Root>
35+
<Card.Root renderBranding={false}>
3636
<Flow.Root
3737
value={model.status}
3838
direction={model.direction}

0 commit comments

Comments
 (0)