-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathSuccessToast.tsx
More file actions
26 lines (24 loc) · 853 Bytes
/
SuccessToast.tsx
File metadata and controls
26 lines (24 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { CustomizeContext } from "../../providers/CustomizeProvider";
import { useContext } from "react";
import { CheckCircle } from "react-feather";
import { animated, useSpring } from "@react-spring/web";
export const SuccessToast = () => {
const customSettings = useContext(CustomizeContext);
const { borderRadius } = customSettings.customization;
const animationProps = useSpring({
from: { bottom: -100, opacity: 0 },
to: { bottom: 12, opacity: 1 },
});
return (
<animated.div
className="skt-w bg-widget-accent text-widget-onAccent p-4 flex items-center absolute left-3 right-3"
style={{
borderRadius: `calc(0.625rem * ${borderRadius})`,
...animationProps,
}}
>
<CheckCircle className="skt-w mr-3 text-widget-onAccent" /> Transaction is
complete
</animated.div>
);
};