aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/src/pages/Settings/components/Message.tsx
blob: eac84131bfe060ba135c7683987b386d28b167bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { Text } from "@mantine/core";
import { FunctionComponent, PropsWithChildren } from "react";

interface MessageProps {
  type?: "warning" | "info";
}

type Props = PropsWithChildren<MessageProps>;

export const Message: FunctionComponent<Props> = ({
  type = "info",
  children,
}) => {
  return (
    <Text size="sm" c={type === "info" ? "dimmed" : "yellow"} my={0}>
      {children}
    </Text>
  );
};