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

28 lines
467 B
TypeScript
Raw Normal View History

2023-07-18 14:55:40 +03:00
interface LabeledTextProps {
id?: string
label: string
text: any
tooltip?: string
}
2023-07-25 20:27:29 +03:00
function LabeledText({ id, label, text, tooltip }: LabeledTextProps) {
2023-07-18 14:55:40 +03:00
return (
2023-07-21 00:09:05 +03:00
<div className='flex justify-between gap-4'>
2023-07-25 20:27:29 +03:00
<label
2023-07-18 14:55:40 +03:00
className='font-semibold'
title={tooltip}
htmlFor={id}
>
{label}
</label>
2023-07-25 20:27:29 +03:00
<span
2023-07-18 14:55:40 +03:00
id={id}
>
{text}
</span>
</div>
);
}
2023-07-25 20:27:29 +03:00
export default LabeledText;