* feat: improve 2fa styles based on feedback * fix: preferences panes and dialogs electron compatibility * fix: no horizontal line when opening two factor activation * feat: improve two factor activation styles * feat: further 2fa style improvements * feat: padding 2fa widgets * feat: add padding between QR code and content * feat: refresh 2fa after passcode confirmation * feat: don't autocomplete passwords for DecoratedInput
29 lines
561 B
TypeScript
29 lines
561 B
TypeScript
import { Icon, IconType } from '@/components/Icon';
|
|
import { FunctionComponent } from 'preact';
|
|
|
|
interface Props {
|
|
iconType: IconType;
|
|
label: string;
|
|
selected: boolean;
|
|
onClick: () => void;
|
|
}
|
|
|
|
export const MenuItem: FunctionComponent<Props> = ({
|
|
iconType,
|
|
label,
|
|
selected,
|
|
onClick,
|
|
}) => (
|
|
<div
|
|
className={`preferences-menu-item ${selected ? 'selected' : ''}`}
|
|
onClick={(e) => {
|
|
e.preventDefault();
|
|
onClick();
|
|
}}
|
|
>
|
|
<Icon className="icon" type={iconType} />
|
|
<div className="min-w-1" />
|
|
{label}
|
|
</div>
|
|
);
|