ui(tokens): migrate Toast component to semantic design system tokens
Replace legacy color tokens in Toast component: - border-kodo-lime → border-success - border-kodo-red → border-destructive - text-kodo-lime → text-success - text-kodo-red → text-destructive - text-kodo-steel → text-muted-foreground - text-white → text-foreground - bg-kodo-ink/90 → bg-card/90 - hover:text-white → hover:text-foreground Toast now adapts correctly to light/dark theme. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
06313c5d72
commit
db4883e0a7
1 changed files with 7 additions and 7 deletions
|
|
@ -81,15 +81,15 @@ export const Toast: React.FC<ToastProps> = ({ id, type, message, onClose }) => {
|
|||
}, [id, onClose]);
|
||||
|
||||
const styles = {
|
||||
success: 'border-kodo-lime text-white bg-kodo-ink/90',
|
||||
error: 'border-kodo-red text-white bg-kodo-ink/90',
|
||||
info: 'border-border text-white bg-kodo-ink/90',
|
||||
success: 'border-success text-foreground bg-card/90',
|
||||
error: 'border-destructive text-foreground bg-card/90',
|
||||
info: 'border-border text-foreground bg-card/90',
|
||||
};
|
||||
|
||||
const icons = {
|
||||
success: <CheckCircle className="w-5 h-5 text-kodo-lime" />,
|
||||
error: <AlertCircle className="w-5 h-5 text-kodo-red" />,
|
||||
info: <Info className="w-5 h-5 text-kodo-steel" />,
|
||||
success: <CheckCircle className="w-5 h-5 text-success" />,
|
||||
error: <AlertCircle className="w-5 h-5 text-destructive" />,
|
||||
info: <Info className="w-5 h-5 text-muted-foreground" />,
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
@ -101,7 +101,7 @@ export const Toast: React.FC<ToastProps> = ({ id, type, message, onClose }) => {
|
|||
<p className="flex-1 text-sm font-medium">{message}</p>
|
||||
<button
|
||||
onClick={() => onClose(id)}
|
||||
className="text-muted-foreground hover:text-white transition-colors"
|
||||
className="text-muted-foreground hover:text-foreground transition-colors"
|
||||
>
|
||||
<X className="w-4 h-4" />
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue