Browse Source
feat: add LoadingBorderSpinner component, implement multi-language support, and introduce new match client workflows.
staging
feat: add LoadingBorderSpinner component, implement multi-language support, and introduce new match client workflows.
staging
40 changed files with 1279 additions and 622 deletions
-
10src/app/finding-match/finding-match-client.tsx
-
28src/app/intro/intro-client.test.tsx
-
5src/app/intro/intro-client.tsx
-
24src/app/layout.tsx
-
200src/app/new-match/new-match-client.tsx
-
112src/app/new-match/profile/page.tsx
-
139src/app/request-accepted/request-accepted-client.tsx
-
7src/components/Componentes/dismiss-reason-sheet.tsx
-
30src/components/Componentes/swipe-button.tsx
-
49src/components/ui/loading-border-spinner.tsx
-
2src/hooks/marriage/types.ts
-
2src/hooks/marriage/use-case-respond.ts
-
1src/icons.tsx
-
26src/lib/auth-bridge.test.ts
-
77src/lib/auth-bridge.ts
-
301src/lib/marriage-field-formatter.ts
-
21src/translations/locales/ar.json
-
27src/translations/locales/az.json
-
19src/translations/locales/bn.json
-
31src/translations/locales/da.json
-
29src/translations/locales/de.json
-
34src/translations/locales/en.json
-
27src/translations/locales/es.json
-
20src/translations/locales/fa.json
-
33src/translations/locales/fr.json
-
29src/translations/locales/gu.json
-
33src/translations/locales/ha.json
-
29src/translations/locales/he.json
-
27src/translations/locales/hi.json
-
29src/translations/locales/id.json
-
33src/translations/locales/ks.json
-
33src/translations/locales/pt.json
-
27src/translations/locales/ru.json
-
23src/translations/locales/sw.json
-
29src/translations/locales/tg.json
-
33src/translations/locales/tr.json
-
33src/translations/locales/ul.json
-
33src/translations/locales/ur.json
-
23src/translations/locales/uz.json
-
33src/translations/locales/zh.json
@ -0,0 +1,49 @@ |
|||
import React from "react"; |
|||
import { cn } from "@/lib/utils"; |
|||
|
|||
export interface LoadingBorderSpinnerProps extends React.ComponentProps<"span"> { |
|||
size?: "xs" | "sm" | "md" | "lg" | "xl"; |
|||
variant?: "primary" | "rose" | "blue" | "muted" | "white" | "current"; |
|||
} |
|||
|
|||
const sizeClasses: Record<NonNullable<LoadingBorderSpinnerProps["size"]>, string> = { |
|||
xs: "size-3.5 border-[1.5px]", |
|||
sm: "size-4 border-2", |
|||
md: "size-5 border-2", |
|||
lg: "size-8 border-[3px]", |
|||
xl: "size-10 border-4", |
|||
}; |
|||
|
|||
const variantClasses: Record<NonNullable<LoadingBorderSpinnerProps["variant"]>, string> = { |
|||
primary: "border-primary/25 border-t-primary dark:border-primary/20 dark:border-t-primary", |
|||
rose: "border-rose-500/25 border-t-rose-500 dark:border-rose-400/20 dark:border-t-rose-400", |
|||
blue: "border-blue-500/25 border-t-blue-500 dark:border-blue-400/20 dark:border-t-blue-400", |
|||
muted: "border-gray-400/25 border-t-gray-600", |
|||
white: "border-white/30 border-t-white", |
|||
current: "border-current/25 border-t-current", |
|||
}; |
|||
|
|||
export function LoadingBorderSpinner({ |
|||
size, |
|||
variant, |
|||
className, |
|||
...props |
|||
}: LoadingBorderSpinnerProps) { |
|||
return ( |
|||
<span |
|||
role="status" |
|||
aria-label="Loading" |
|||
className={cn( |
|||
"inline-block animate-spin rounded-full shrink-0", |
|||
size ? sizeClasses[size] : "size-5 border-2", |
|||
variant |
|||
? variantClasses[variant] |
|||
: "border-rose-500/25 border-t-rose-500 dark:border-rose-400/20 dark:border-t-rose-400", |
|||
className, |
|||
)} |
|||
{...props} |
|||
/> |
|||
); |
|||
} |
|||
|
|||
export default LoadingBorderSpinner; |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue