Skip to content

Commit 5984cda

Browse files
committed
style: toast
1 parent 000316e commit 5984cda

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/components/Toast.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,18 @@ const Toast = ({ id, title, message, duration = 3000, removeToast }) => {
1717
return (
1818
<motion.div
1919
initial={{ x: '100%', opacity: 0 }}
20-
animate={{ x: 0, opacity: 1 }}
20+
animate={{ x: 0, opacity: 0.99 }}
2121
exit={{ opacity: 0 }}
2222
transition={{ type: 'spring', stiffness: 120, damping: 20 }}
23-
className="text-gray-300 py-4 px-10 rounded-lg shadow-lg border backdrop-blur-sm flex items-center justify-between w-96 mb-4"
24-
style={{
25-
backgroundColor: colors['toast-background'],
26-
borderColor: colors['toast-border'],
27-
}}
23+
className="text-gray-100 font-arvo py-4 px-10 rounded-lg shadow-lg border backdrop-blur-sm flex items-center justify-between w-96 mb-4
24+
transition-colors bg-toast-background border-toast-border hover:bg-toast-background/90"
2825
>
29-
<div className="flex flex-col text-sm">
30-
<span>{title}</span>
31-
<span>{message}</span>
26+
<div className="flex flex-col text-sm group">
27+
<span className="text-base text-red-100">{title}</span>
28+
<span className="text-sm text-stone-200">{message}</span>
3229
</div>
33-
<button onClick={() => removeToast(id)} className="pr-2">
34-
<XIcon size={24} weight="bold" />
30+
<button onClick={() => removeToast(id)} className="p-2 border rounded-sm shadow-2xl border-dashed rounded-xs hover:bg-toast-background/100 ">
31+
<XIcon size={24} weight="bold" className="text-shadow-lg "/>
3532
</button>
3633
</motion.div>
3734
);

src/config/colors.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ module.exports = {
6565
'tools-alpha-50': 'rgba(224, 170, 255, 0.5)',
6666

6767
// Toast colors
68-
'toast-background': 'rgba(68, 64, 59, 0.8)',
69-
'toast-border': '#5a5e64',
68+
'toast-background': 'rgba(72,59,87,0.8)',
69+
'toast-hover-background': 'rgba(102,84,122,0.8)',
70+
'toast-border': '#514b68',
7071

7172
// Code Theme Colors (from src/utils/customTheme.js)
7273
codeTheme: {

0 commit comments

Comments
 (0)