mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-06-03 06:35:42 -05:00
19 lines
421 B
TypeScript
19 lines
421 B
TypeScript
import React from "react"
|
|
import { Alert as ChakraAlert, AlertIcon } from "@chakra-ui/core"
|
|
|
|
interface AlertProps {
|
|
children: string | string[]
|
|
status: "error" | "success" | "warning" | "info"
|
|
}
|
|
|
|
const Alert: React.FC<AlertProps> = ({ children, status }) => {
|
|
return (
|
|
<ChakraAlert status={status} borderRadius="5px" mt="2em">
|
|
<AlertIcon />
|
|
{children}
|
|
</ChakraAlert>
|
|
)
|
|
}
|
|
|
|
export default Alert
|