Files
Netcatty/components/ui/label.tsx
T
bincxz 7a2a1992f2 fix(ui): stop CJK labels clipping under tight line-height
Chinese glyphs (PingFang etc.) paint outside a 1.0 em box, so leading-none
plus truncate was slicing vault tree, tabs, and dialog titles. Use safer
line-heights and slightly taller note title inputs.
2026-07-31 14:21:05 +08:00

20 lines
436 B
TypeScript
Executable File

import * as React from "react"
import { cn } from "../../lib/utils"
const Label = React.forwardRef<
HTMLLabelElement,
React.LabelHTMLAttributes<HTMLLabelElement>
>(({ className, ...props }, ref) => (
<label
ref={ref}
className={cn(
"text-sm font-medium leading-5 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
className
)}
{...props}
/>
))
Label.displayName = "Label"
export { Label }