ConceptPortal-public/rsconcept/frontend/src/components/Common/Label.tsx
2023-12-28 14:04:44 +03:00

21 lines
391 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-semibold whitespace-nowrap', className)} {...restProps}>
{text}
</label>
);
}
export default Label;