23 lines
567 B
TypeScript
23 lines
567 B
TypeScript
import * as React from "react";
|
|
|
|
export type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement>
|
|
|
|
export const Label = React.forwardRef<HTMLLabelElement, LabelProps>(
|
|
({ className = "", children, ...props }, ref) => {
|
|
return (
|
|
<label
|
|
ref={ref}
|
|
className={
|
|
"text-sm font-medium text-slate-600 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 " +
|
|
className
|
|
}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</label>
|
|
);
|
|
}
|
|
);
|
|
Label.displayName = "Label";
|
|
|
|
export default Label;
|