1 import { c } from 'ttag';
3 import LayoutCards from '@proton/components/components/input/LayoutCards';
4 import { DENSITY } from '@proton/shared/lib/constants';
5 import comfortableDensitySvg from '@proton/styles/assets/img/layout/layout-thumb-density-comfortable.svg';
6 import compactDensitySvg from '@proton/styles/assets/img/layout/layout-thumb-density-compact.svg';
8 const { COMFORTABLE, COMPACT } = DENSITY;
12 onChange: (density: DENSITY) => void;
14 describedByID: string;
19 const DensityRadiosCards = ({ density, onChange, loading, className, liClassName, describedByID, ...rest }: Props) => {
20 const layoutCardComfortable = {
22 selected: density === COMFORTABLE,
25 label: c('Label to change density').t`Comfortable`,
27 onChange(COMFORTABLE);
29 src: comfortableDensitySvg,
32 const layoutCardCompact = {
34 selected: density === COMPACT,
37 label: c('Label to change density').t`Compact`,
41 src: compactDensitySvg,
47 list={[layoutCardComfortable, layoutCardCompact]}
49 liClassName={liClassName}
50 describedByID={describedByID}
56 export default DensityRadiosCards;