mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
Update Constants.ts
This commit is contained in:
parent
e7b1973764
commit
3c956dba83
14
components/Message.tsx
Normal file
14
components/Message.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import { MessageColor } from '@utils/Constants'
|
||||
|
||||
const Message = ({ type, children }:MessageProps):JSX.Element => {
|
||||
return <div className={`${MessageColor[type]} px-6 py-4 my-4 rounded-md text-base mx-auto w-full`}>
|
||||
{children}
|
||||
</div>
|
||||
}
|
||||
|
||||
interface MessageProps{
|
||||
type?: 'success' | 'error' | 'warning' | 'info'
|
||||
children: JSX.Element | JSX.Element[] | string
|
||||
}
|
||||
|
||||
export default Message
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user