feat: opengraph design

This commit is contained in:
enscribe 2024-09-12 16:34:38 -07:00
parent 0b430e5d43
commit c410c499e1
No known key found for this signature in database
GPG key ID: 9BBD5C4114E25322
38 changed files with 179 additions and 66 deletions

View file

@ -10,7 +10,7 @@ const Avatar = React.forwardRef<
<AvatarPrimitive.Root
ref={ref}
className={cn(
'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full',
'relative flex h-10 w-10 shrink-0 overflow-hidden',
className,
)}
{...props}
@ -37,7 +37,7 @@ const AvatarFallback = React.forwardRef<
<AvatarPrimitive.Fallback
ref={ref}
className={cn(
'flex h-full w-full items-center justify-center rounded-full bg-muted',
'flex h-full w-full items-center justify-center bg-muted',
className,
)}
{...props}
@ -45,4 +45,25 @@ const AvatarFallback = React.forwardRef<
))
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
export { Avatar, AvatarFallback, AvatarImage }
interface AvatarComponentProps {
src?: string
alt?: string
fallback?: string
className?: string
}
const AvatarComponent: React.FC<AvatarComponentProps> = ({
src,
alt,
fallback,
className,
}) => {
return (
<Avatar className={className}>
<AvatarImage src={src} alt={alt} />
<AvatarFallback>{fallback}</AvatarFallback>
</Avatar>
)
}
export default AvatarComponent

View file

@ -5,7 +5,7 @@ import * as React from 'react'
import { cn } from '@/lib/utils'
const badgeVariants = cva(
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring focus:ring-ring',
{
variants: {
variant: {

View file

@ -8,7 +8,7 @@ const Card = React.forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn('rounded-xl border bg-card text-card-foreground', className)}
className={cn('bg-card text-card-foreground rounded-xl border', className)}
{...props}
/>
))

View file

@ -41,7 +41,7 @@ export function ModeToggle() {
<span className="sr-only">Toggle theme</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuContent align="end" className="bg-background">
<DropdownMenuItem onClick={() => setThemeState('theme-light')}>
<Sun className="mr-2 size-4" />
<span>Light</span>