Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): Font inconsistencies #3834

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/sharp-ads-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
28 changes: 20 additions & 8 deletions packages/ui/src/components/sign-in/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,13 @@ export function SignInComponentLoaded() {
resend
// eslint-disable-next-line react/no-unstable-nested-components
fallback={({ resendableAfter }) => (
<p className='text-gray-11 border border-transparent px-2.5 py-1.5 text-center text-base font-medium'>
<LinkButton
type='button'
disabled
>
{t('signIn.emailCode.resendButton')} (
<span className='tabular-nums'>{resendableAfter}</span>)
</p>
</LinkButton>
)}
>
<LinkButton type='button'>{t('signIn.emailCode.resendButton')}</LinkButton>
Expand Down Expand Up @@ -655,10 +658,13 @@ export function SignInComponentLoaded() {
resend
// eslint-disable-next-line react/no-unstable-nested-components
fallback={({ resendableAfter }) => (
<p className='text-gray-11 border border-transparent px-2.5 py-1.5 text-center text-base font-medium'>
<LinkButton
type='button'
disabled
>
{t('signIn.phoneCode.resendButton')} (
<span className='tabular-nums'>{resendableAfter}</span>)
</p>
</LinkButton>
)}
>
<LinkButton type='button'>{t('signIn.phoneCode.resendButton')}</LinkButton>
Expand Down Expand Up @@ -737,10 +743,13 @@ export function SignInComponentLoaded() {
resend
// eslint-disable-next-line react/no-unstable-nested-components
fallback={({ resendableAfter }) => (
<p className='text-gray-11 border border-transparent px-2.5 py-1.5 text-center text-base font-medium'>
<LinkButton
type='button'
disabled
>
{t('signIn.emailLink.resendButton')} (
<span className='tabular-nums'>{resendableAfter}</span>)
</p>
</LinkButton>
)}
>
<LinkButton type='button'>{t('signIn.emailLink.resendButton')}</LinkButton>
Expand Down Expand Up @@ -777,10 +786,13 @@ export function SignInComponentLoaded() {
resend
// eslint-disable-next-line react/no-unstable-nested-components
fallback={({ resendableAfter }) => (
<p className='text-gray-11 border border-transparent px-2.5 py-1.5 text-center text-base font-medium'>
<LinkButton
type='button'
disabled
>
{t('signIn.phoneCode.resendButton')} (
<span className='tabular-nums'>{resendableAfter}</span>)
</p>
</LinkButton>
)}
>
<LinkButton type='button'>{t('signIn.phoneCode.resendButton')}</LinkButton>
Expand Down
23 changes: 15 additions & 8 deletions packages/ui/src/components/sign-up/sign-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,19 @@ function SignUpComponentLoaded() {
</Common.GlobalError>
<OTPField
disabled={isGlobalLoading}
// TODO:
// 1. Replace `button` with consolidated styles (tackled later)
resend={
<SignUp.Action
asChild
resend
// eslint-disable-next-line react/no-unstable-nested-components
fallback={({ resendableAfter }) => (
<p className='text-gray-11 border border-transparent px-2.5 py-1.5 text-center text-base font-medium'>
<LinkButton
type='button'
disabled
>
{t('signUp.phoneCode.resendButton')} (
<span className='tabular-nums'>{resendableAfter}</span>)
</p>
</LinkButton>
)}
>
<LinkButton type='button'>{t('signUp.phoneCode.resendButton')}</LinkButton>
Expand Down Expand Up @@ -290,10 +291,13 @@ function SignUpComponentLoaded() {
resend
// eslint-disable-next-line react/no-unstable-nested-components
fallback={({ resendableAfter }) => (
<p className='text-gray-11 border border-transparent px-2.5 py-1.5 text-center text-base font-medium'>
<LinkButton
type='button'
disabled
>
{t('signUp.emailCode.resendButton')} (
<span className='tabular-nums'>{resendableAfter}</span>)
</p>
</LinkButton>
)}
>
<LinkButton type='button'>{t('signUp.emailCode.resendButton')}</LinkButton>
Expand Down Expand Up @@ -360,10 +364,13 @@ function SignUpComponentLoaded() {
// eslint-disable-next-line react/no-unstable-nested-components
fallback={({ resendableAfter }) => {
return (
<p className='text-gray-11 border border-transparent px-2.5 py-1.5 text-center text-base font-medium'>
<LinkButton
type='button'
disabled
>
{t('signUp.emailLink.resendButton')} (
<span className='tabular-nums'>{resendableAfter}</span>)
</p>
</LinkButton>
);
}}
>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/primitives/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const Footer = React.forwardRef(function Footer(
{children}
{branded ? (
<div className='grid place-content-center px-6 py-4'>
<p className='text-gray-a11 inline-flex items-center gap-x-1 text-sm'>
<p className='text-gray-a11 inline-flex items-center gap-x-1 text-sm font-medium'>
Secured by{' '}
<a
aria-label='Clerk logo'
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/primitives/separator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const Separator = React.forwardRef<HTMLParagraphElement, React.HTMLAttrib
ref={forwardedRef}
{...props}
className={cx(
'before:bg-gray-a6 after:bg-gray-a6 text-gray-a11 flex items-center gap-x-3 text-base before:h-px before:flex-1 after:h-px after:flex-1',
'before:bg-gray-a6 after:bg-gray-a6 text-gray-a11 flex items-center gap-x-4 text-base before:h-px before:flex-1 after:h-px after:flex-1',
className,
)}
>
Expand Down
Loading