ConceptPortal-public/rsconcept/frontend/src/components/ui/Label.tsx
2024-01-04 19:38:12 +03:00

21 lines
389 B
TypeScript

import clsx from 'clsx';
import { CProps } from '../props';
interface LabelProps extends CProps.Label {
text?: string;
}
function Label({ text, className, ...restProps }: LabelProps) {
if (!text) {
return null;
}
return (
<label className={clsx('text-sm font-medium whitespace-nowrap', className)} {...restProps}>
{text}
</label>
);
}
export default Label;