Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / components / containers / messages / SpamActionSelect.tsx
blobbef035d2dceb10bfc26dae3f153478b976a0098d
1 import { c } from 'ttag';
3 import Option from '@proton/components/components/option/Option';
4 import SelectTwo from '@proton/components/components/selectTwo/SelectTwo';
5 import { SPAM_ACTION } from '@proton/shared/lib/mail/mailSettings';
7 interface Props {
8     onChange: (spamAction: SPAM_ACTION | null) => void;
9     value: SPAM_ACTION | null;
10     id?: string;
11     loading?: boolean;
14 const SpamActionSelect = ({ onChange, ...rest }: Props) => {
15     return (
16         <SelectTwo onChange={({ value }) => onChange(value as SPAM_ACTION | null)} {...rest}>
17             <Option title={c('Option').t`On`} value={SPAM_ACTION.JustSpam} />
18             <Option title={c('Option').t`Off`} value={SPAM_ACTION.SpamAndUnsub} />
19             <Option title={c('Option').t`Ask each time`} value={null} />
20         </SelectTwo>
21     );
24 export default SpamActionSelect;