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