feat: change center-component to components

This commit is contained in:
2025-03-25 15:51:15 +08:00
parent ef50106e5c
commit 45443709af
34 changed files with 504 additions and 88 deletions

View File

@@ -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';

View File

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