1 import { c } from 'ttag';
3 import Icon from '@proton/components/components/icon/Icon';
4 import Info from '@proton/components/components/link/Info';
5 import type { ThemeTypes } from '@proton/shared/lib/themes/themes';
6 import { PROTON_THEMES_MAP } from '@proton/shared/lib/themes/themes';
7 import clsx from '@proton/utils/clsx';
9 import type { Theme } from './ThemeCards';
10 import ThemeCards from './ThemeCards';
11 import type { ThemeSvgSize } from './ThemeSvg';
14 mode: 'light' | 'dark';
18 listClassName?: string;
19 themeIdentifier: ThemeTypes;
21 onChange: (themeType: ThemeTypes) => void;
25 const ThemeSyncModeCard = ({
36 <div className={clsx('border rounded-lg p-4', className)}>
37 <div className={clsx(size !== 'small' && 'flex justify-space-between flex-nowrap gap-2', 'mb-4')}>
38 <div className="flex items-center flex-nowrap gap-2">
39 <Icon name={mode === 'light' ? 'sun' : 'moon'} className="shrink-0" />
40 <span className={clsx(active && 'text-semibold')}>
41 {mode === 'light' ? c('Title').t`Day theme` : c('Title').t`Night theme`}
42 {active && ` ${c('Title').t`(active)`}`}
48 .t`The selected theme will be active when your system is set to "light mode"`
50 .t`The selected theme will be active when your system is set to "dark mode"`
54 <div className={clsx(active && 'text-semibold', size === 'small' && 'ml-6')}>
55 {PROTON_THEMES_MAP[themeIdentifier].label}
60 className={listClassName}
62 themeIdentifier={themeIdentifier}
69 export default ThemeSyncModeCard;