mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
21 lines
391 B
TypeScript
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;
|