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

24 lines
440 B
TypeScript
Raw Normal View History

interface LabeledValueProps {
2023-07-18 14:55:40 +03:00
id?: string
label: string
text: string | number
2023-07-18 14:55:40 +03:00
tooltip?: string
}
function LabeledValue({ id, label, text, tooltip }: LabeledValueProps) {
2023-07-18 14:55:40 +03:00
return (
<div className='flex justify-between gap-3'>
<label
className='font-semibold'
title={tooltip}
htmlFor={id}
>
{label}
</label>
<span id={id}>
{text}
</span>
</div>);
2023-07-18 14:55:40 +03:00
}
export default LabeledValue;