ConceptPortal-public/rsconcept/frontend/src/components/Common/Label.tsx

26 lines
410 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;