ConceptPortal-public/rsconcept/frontend/src/components/Common/Label.tsx
2023-10-14 23:46:36 +03:00

22 lines
471 B
TypeScript

import { LabelHTMLAttributes } from 'react';
interface LabelProps
extends Omit<React.DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, 'children' | 'title'> {
text: string
tooltip?: string
}
function Label({ text, tooltip, className, ...props }: LabelProps) {
return (
<label
className={`text-sm font-semibold ${className}`}
title={tooltip}
{...props}
>
{text}
</label>
);
}
export default Label;