feat: update schema, add ProjectCard
, readme
This commit is contained in:
parent
fbeab5a744
commit
b93eddea6b
24 changed files with 373 additions and 72 deletions
|
@ -25,12 +25,14 @@ const badgeVariants = cva(
|
|||
|
||||
export interface BadgeProps
|
||||
extends React.HTMLAttributes<HTMLDivElement>,
|
||||
VariantProps<typeof badgeVariants> {}
|
||||
VariantProps<typeof badgeVariants> {
|
||||
showHash?: boolean
|
||||
}
|
||||
|
||||
function Badge({ className, variant, ...props }: BadgeProps) {
|
||||
function Badge({ className, variant, showHash = true, ...props }: BadgeProps) {
|
||||
return (
|
||||
<div className={cn(badgeVariants({ variant }), className)} {...props}>
|
||||
<Hash className="size-3 -translate-x-0.5" />
|
||||
{showHash && <Hash className="size-3 -translate-x-0.5" />}
|
||||
{props.children}
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ const Card = React.forwardRef<
|
|||
>(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn('bg-card text-card-foreground rounded-xl border', className)}
|
||||
className={cn('bg-background rounded-xl border', className)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
|
|
|
@ -23,7 +23,16 @@ export function ModeToggle() {
|
|||
theme === 'dark' ||
|
||||
(theme === 'system' &&
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||
|
||||
document.documentElement.classList.add('disable-transitions')
|
||||
|
||||
document.documentElement.classList[isDark ? 'add' : 'remove']('dark')
|
||||
|
||||
window.getComputedStyle(document.documentElement).getPropertyValue('opacity')
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.remove('disable-transitions')
|
||||
})
|
||||
}, [theme])
|
||||
|
||||
return (
|
||||
|
@ -56,4 +65,4 @@ export function ModeToggle() {
|
|||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue