Update tss-react

This commit is contained in:
garronej
2021-08-20 17:03:50 +02:00
parent 1c2a55f2fd
commit 97544a952f
11 changed files with 87 additions and 71 deletions

View File

@ -4,19 +4,21 @@ import { Template } from "./Template";
import type { KcProps } from "./KcProps";
import type { KcContextBase } from "../getKcContext/KcContextBase";
import { useKcMessage } from "../i18n/useKcMessage";
import { cx } from "tss-react";
import { useCssAndCx } from "tss-react";
import { useConstCallback } from "powerhooks/useConstCallback";
export const Login = memo(({ kcContext, ...props }: { kcContext: KcContextBase.Login; } & KcProps) => {
const { msg, msgStr } = useKcMessage();
const {
social, realm, url,
usernameEditDisabled, login,
auth, registrationDisabled
} = kcContext;
const { msg, msgStr } = useKcMessage();
const { cx } = useCssAndCx();
const [isLoginButtonDisabled, setIsLoginButtonDisabled] = useState(false);
const onSubmit = useConstCallback(() =>