import { Badge } from './leafygreen'; import { css } from '@leafygreen-ui/emotion'; import { spacing } from '@leafygreen-ui/tokens'; import React from 'react'; import IndexIcon from './index-icon'; import { Variant as BadgeVariant } from '@leafygreen-ui/badge'; const keyListStyles = css({ display: 'inline-flex', gap: spacing[1], }); const badgeStyles = css({ gap: spacing[1], }); type KeyListProps = { keys: { field: string; value: any }[]; 'data-testid'?: string; }; const IndexKeysBadge: React.FunctionComponent = ({ keys, 'data-testid': testId, }) => { return (
{keys.map(({ field, value }) => ( {field} ))}
); }; export { IndexKeysBadge };