mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-27 05:20:36 +03:00
22 lines
471 B
TypeScript
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;
|