diff --git a/commafeed-client/src/components/ActionButtton.tsx b/commafeed-client/src/components/ActionButtton.tsx index 6430e337..2482ea38 100644 --- a/commafeed-client/src/components/ActionButtton.tsx +++ b/commafeed-client/src/components/ActionButtton.tsx @@ -6,7 +6,7 @@ import { forwardRef, MouseEventHandler, ReactNode } from "react" interface ActionButtonProps { className?: string icon?: ReactNode - label?: string + label?: ReactNode onClick?: MouseEventHandler variant?: ActionIconVariant & ButtonVariant showLabelOnMobile?: boolean diff --git a/commafeed-client/src/components/Alert.tsx b/commafeed-client/src/components/Alert.tsx index 366ce7c1..55f25313 100644 --- a/commafeed-client/src/components/Alert.tsx +++ b/commafeed-client/src/components/Alert.tsx @@ -1,5 +1,5 @@ -import { t } from "@lingui/macro" -import { Alert as MantineAlert, Box } from "@mantine/core" +import { Trans } from "@lingui/macro" +import { Box, Alert as MantineAlert } from "@mantine/core" import { Fragment } from "react" import { TbAlertCircle, TbAlertTriangle, TbCircleCheck } from "react-icons/tb" @@ -10,24 +10,24 @@ export interface ErrorsAlertProps { } export function Alert(props: ErrorsAlertProps) { - let title: string + let title: React.ReactNode let color: string let icon: React.ReactNode const level = props.level ?? "error" switch (level) { case "error": - title = t`Error` + title = Error color = "red" icon = break case "warning": - title = t`Warning` + title = Warning color = "orange" icon = break case "success": - title = t`Success` + title = Success color = "green" icon = break diff --git a/commafeed-client/src/components/admin/UserEdit.tsx b/commafeed-client/src/components/admin/UserEdit.tsx index 266392dc..e18f5eee 100644 --- a/commafeed-client/src/components/admin/UserEdit.tsx +++ b/commafeed-client/src/components/admin/UserEdit.tsx @@ -1,4 +1,4 @@ -import { t, Trans } from "@lingui/macro" +import { Trans } from "@lingui/macro" import { Box, Button, Checkbox, Group, PasswordInput, Stack, TextInput } from "@mantine/core" import { useForm } from "@mantine/form" import { client, errorToStrings } from "app/client" @@ -29,11 +29,11 @@ export function UserEdit(props: UserEditProps) {
- - - - - + Name} {...form.getInputProps("name")} required /> + Password} {...form.getInputProps("password")} required={!props.user} /> + E-mail} {...form.getInputProps("email")} /> + Admin} {...form.getInputProps("admin", { type: "checkbox" })} /> + Enabled} {...form.getInputProps("enabled", { type: "checkbox" })} />