Files
cunkebao_v3/Cunkebao/lib/utils.ts
笔记本里的永平 5ff15472f5 feat: 本次提交更新内容如下
场景获客列表搞定
2025-07-07 17:08:27 +08:00

20 lines
563 B
TypeScript

import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
// 添加 toast 函数
type ToastType = {
title: string
description: string
variant?: "default" | "destructive" | "secondary"
}
export const toast = ({ title, description, variant = "default" }: ToastType) => {
console.log(`[${variant.toUpperCase()}] ${title}: ${description}`)
// 这里可以实现实际的 toast 逻辑
// 如果有全局的 toast 组件,可以在这里调用
}