1 import type { FC, PropsWithChildren } from 'react';
3 import clsx from '@proton/utils/clsx';
5 import './FieldsetCluster.scss';
7 type Props = PropsWithChildren<{
8 as?: 'fieldset' | 'div' | 'span';
10 mode?: 'read' | 'write';
13 export const FieldsetCluster: FC<Props> = ({ as: Component = 'fieldset', children, className, mode = 'write' }) => (
16 'pass-fieldset-cluster max-w-full border-none p-0 m-0 rounded-lg mb-2',
17 mode === 'write' ? 'pass-fieldset-cluster--write' : 'pass-fieldset-cluster--read',
20 style={mode === 'write' ? { background: 'var(--field-norm)' } : undefined}