mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
28 lines
479 B
TypeScript
28 lines
479 B
TypeScript
interface LabeledTextProps {
|
|
id?: string
|
|
label: string
|
|
text: string | number
|
|
tooltip?: string
|
|
}
|
|
|
|
function LabeledText({ id, label, text, tooltip }: LabeledTextProps) {
|
|
return (
|
|
<div className='flex justify-between gap-4'>
|
|
<label
|
|
className='font-semibold'
|
|
title={tooltip}
|
|
htmlFor={id}
|
|
>
|
|
{label}
|
|
</label>
|
|
<span
|
|
id={id}
|
|
>
|
|
{text}
|
|
</span>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default LabeledText;
|