feat: improve 2fa styles based on feedback (#635)

* 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
This commit is contained in:
Gorjan Petrovski
2021-09-17 18:14:53 +02:00
committed by GitHub
parent 9d85fbccc4
commit 8fb34f2e85
25 changed files with 494 additions and 228 deletions

View File

@@ -10,6 +10,15 @@ interface Props {
className?: string;
icon: IconType;
iconClassName?: string;
/**
* Button tooltip
*/
title: string;
focusable: boolean;
}
/**
@@ -18,18 +27,20 @@ interface Props {
*/
export const IconButton: FunctionComponent<Props> = ({
onClick,
className,
className = '',
icon,
title,
focusable,
}) => {
const click = (e: MouseEvent) => {
e.preventDefault();
onClick();
};
const focusableClass = focusable ? '' : 'focus:shadow-none';
return (
<button
className={`no-border cursor-pointer bg-transparent hover:brightness-130 p-0 ${
className ?? ''
}`}
title={title}
className={`no-border cursor-pointer bg-transparent flex flex-row items-center hover:brightness-130 p-0 ${focusableClass} ${className}`}
onClick={click}
>
<Icon type={icon} />