2024-06-07 20:17:03 +03:00
|
|
|
import clsx from 'clsx';
|
|
|
|
|
|
|
|
import { CProps } from '../props';
|
|
|
|
|
2024-08-23 12:35:05 +03:00
|
|
|
interface ValueLabeledProps extends CProps.Styling {
|
2024-06-07 20:17:03 +03:00
|
|
|
id?: string;
|
|
|
|
label: string;
|
|
|
|
text: string | number;
|
|
|
|
title?: string;
|
|
|
|
}
|
|
|
|
|
2024-08-23 12:35:05 +03:00
|
|
|
function ValueLabeled({ id, label, text, title, className, ...restProps }: ValueLabeledProps) {
|
2024-06-07 20:17:03 +03:00
|
|
|
return (
|
|
|
|
<div className={clsx('flex justify-between gap-6', className)} {...restProps}>
|
|
|
|
<span title={title}>{label}</span>
|
|
|
|
<span id={id}>{text}</span>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-08-23 12:35:05 +03:00
|
|
|
export default ValueLabeled;
|