openreplay/frontend/app/components/Session_/SessionInfoItem/SessionInfoItem.tsx
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

35 lines
887 B
TypeScript

import React from 'react';
import { Icon } from 'UI';
import cn from 'classnames';
interface Props {
label: string;
icon?: string;
comp?: React.ReactNode;
value: string;
isLast?: boolean;
}
export default function SessionInfoItem(props: Props) {
const { label, icon, value, comp, isLast = false } = props;
return (
<div
className={cn('flex items-center w-full py-2 color-gray-dark', {
'border-b': !isLast,
})}
>
<div className="px-2 capitalize" style={{ width: '30px' }}>
{icon && <Icon name={icon} size="16" />}
{comp && comp}
</div>
<div
className={cn('px-2', /ios/i.test(label) ? '' : 'capitalize')}
style={{ minWidth: '160px' }}
>
{label}
</div>
<div className="color-gray-medium px-2" style={{ minWidth: '160px' }}>
{value}
</div>
</div>
);
}