mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
fix(tailwind): add missing shadcn/ui color mappings for opaque dialog backgrounds
The dialog backgrounds were transparent because Tailwind 3 requires explicit color mappings in the config to use CSS variables. Added standard shadcn/ui color mappings (background, foreground, card, primary, etc.) and removed unnecessary overlayClassName overrides from dialog components.
This commit is contained in:
@@ -40,11 +40,7 @@ export function ConfirmDialog({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<DialogContent
|
||||
className="max-w-sm"
|
||||
zIndex="alert"
|
||||
overlayClassName="bg-background/80"
|
||||
>
|
||||
<DialogContent className="max-w-sm" zIndex="alert">
|
||||
<DialogHeader className="space-y-3 border-b-0 bg-transparent pb-0">
|
||||
<DialogTitle className="flex items-center gap-2 text-lg font-semibold">
|
||||
<AlertTriangle className="h-5 w-5 text-destructive" />
|
||||
|
||||
@@ -228,7 +228,6 @@ const McpWizardModal: React.FC<McpWizardModalProps> = ({
|
||||
<DialogContent
|
||||
className="max-w-2xl max-h-[90vh] flex flex-col"
|
||||
zIndex="alert"
|
||||
overlayClassName="bg-background/80"
|
||||
>
|
||||
<DialogHeader className="space-y-3 border-b-0 bg-transparent pb-0">
|
||||
<DialogTitle className="text-lg font-semibold">
|
||||
|
||||
@@ -8,6 +8,40 @@ export default {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
// shadcn/ui CSS 变量映射
|
||||
background: "hsl(var(--background))",
|
||||
foreground: "hsl(var(--foreground))",
|
||||
card: {
|
||||
DEFAULT: "hsl(var(--card))",
|
||||
foreground: "hsl(var(--card-foreground))",
|
||||
},
|
||||
popover: {
|
||||
DEFAULT: "hsl(var(--popover))",
|
||||
foreground: "hsl(var(--popover-foreground))",
|
||||
},
|
||||
primary: {
|
||||
DEFAULT: "hsl(var(--primary))",
|
||||
foreground: "hsl(var(--primary-foreground))",
|
||||
},
|
||||
secondary: {
|
||||
DEFAULT: "hsl(var(--secondary))",
|
||||
foreground: "hsl(var(--secondary-foreground))",
|
||||
},
|
||||
muted: {
|
||||
DEFAULT: "hsl(var(--muted))",
|
||||
foreground: "hsl(var(--muted-foreground))",
|
||||
},
|
||||
accent: {
|
||||
DEFAULT: "hsl(var(--accent))",
|
||||
foreground: "hsl(var(--accent-foreground))",
|
||||
},
|
||||
destructive: {
|
||||
DEFAULT: "hsl(var(--destructive))",
|
||||
foreground: "hsl(var(--destructive-foreground))",
|
||||
},
|
||||
border: "hsl(var(--border))",
|
||||
input: "hsl(var(--input))",
|
||||
ring: "hsl(var(--ring))",
|
||||
// macOS 风格系统蓝
|
||||
blue: {
|
||||
400: '#409CFF',
|
||||
|
||||
Reference in New Issue
Block a user