openreplay/frontend/app/components/shared/SessionItem/SessionMetaList/SessionMetaList.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

28 lines
769 B
TypeScript

import React from 'react';
import cn from 'classnames';
import MetaItem from '../MetaItem';
import MetaMoreButton from '../MetaMoreButton';
interface Props {
className?: string;
metaList: any[];
maxLength?: number;
}
export default function SessionMetaList(props: Props) {
const { className = '', metaList, maxLength = 4 } = props;
return (
<div className={cn('text-sm flex items-center', className)}>
{metaList.slice(0, maxLength).map(({ label, value }, index) => (
<React.Fragment key={index}>
<MetaItem label={label} value={`${value}`} className="mr-3" />
</React.Fragment>
))}
{metaList.length > maxLength && (
<MetaMoreButton list={metaList} maxLength={maxLength} />
)}
</div>
);
}