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

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>
  );
};