feat: change center-component to components
This commit is contained in:
@@ -12,7 +12,7 @@ import clsx from 'clsx';
|
||||
import { Button, Menu, MenuItem } from '@mui/material';
|
||||
import i18n from 'i18next';
|
||||
|
||||
import { IconButton } from '@kevisual/center-components/button/index.tsx';
|
||||
import { IconButton } from '@kevisual/components/button/index.tsx';
|
||||
import { Languages } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import { toast } from 'react-toastify';
|
||||
import { toast, ToastOptions } from 'react-toastify';
|
||||
|
||||
export const message = {
|
||||
success: (message: string) => {
|
||||
toast.success(message);
|
||||
success: (message: string, opts?: ToastOptions) => {
|
||||
toast.success(message, opts);
|
||||
},
|
||||
error: (message: string) => {
|
||||
toast.error(message);
|
||||
error: (message: string, opts?: ToastOptions) => {
|
||||
toast.error(message, opts);
|
||||
},
|
||||
warning: (message: string) => {
|
||||
toast.warning(message);
|
||||
warning: (message: string, opts?: ToastOptions) => {
|
||||
toast.warning(message, opts);
|
||||
},
|
||||
info: (message: string) => {
|
||||
toast.info(message);
|
||||
info: (message: string, opts?: ToastOptions) => {
|
||||
toast.info(message, opts);
|
||||
},
|
||||
loading: (message: string) => {
|
||||
const toastId = toast.loading(message);
|
||||
loading: (message: string, opts?: ToastOptions) => {
|
||||
const toastId = toast.loading(message, opts);
|
||||
return () => {
|
||||
toast.dismiss(toastId);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user