import React from 'react'; import { localized } from 'mailspring-exports'; import { RetinaImg } from 'mailspring-component-kit'; export const QuotedTextControl: React.FunctionComponent<{ quotedTextPresent: boolean; quotedTextHidden: boolean; onUnhide: () => void; onRemove: () => void; }> = props => { if (!props.quotedTextPresent || !props.quotedTextHidden) { return null; } return ( { if (e.target instanceof HTMLElement && e.target.closest('.remove-quoted-text')) return; e.preventDefault(); e.stopPropagation(); props.onUnhide(); }} > ••• { e.preventDefault(); e.stopPropagation(); props.onRemove(); }} > ); };