diff --git a/components/Message.tsx b/components/Message.tsx new file mode 100644 index 0000000..31b7411 --- /dev/null +++ b/components/Message.tsx @@ -0,0 +1,14 @@ +import { MessageColor } from '@utils/Constants' + +const Message = ({ type, children }:MessageProps):JSX.Element => { + return
+ {children} +
+} + +interface MessageProps{ + type?: 'success' | 'error' | 'warning' | 'info' + children: JSX.Element | JSX.Element[] | string +} + +export default Message \ No newline at end of file diff --git a/utils/Constants.ts b/utils/Constants.ts index ab73f52..efbb340 100644 --- a/utils/Constants.ts +++ b/utils/Constants.ts @@ -125,6 +125,13 @@ export const reportCats = [ '기타', ] +export const MessageColor = { + success: 'bg-green-200 text-green-800', + error: 'bg-red-200 text-red-800', + warning: 'bg-yellow-50 text-yellow-700', + info: 'bg-blue-200 text-blue-800' +} + export const BASE_URLs = { api: 'https://discord.com/api', cdn: 'https://cdn.discordapp.com'