Skip to content

Commit

Permalink
updated dialogues
Browse files Browse the repository at this point in the history
  • Loading branch information
jude7733 committed Feb 4, 2024
1 parent 16d490d commit 5c26179
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/Footer/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ ul {
display: grid;
place-items: center;
clip-path: polygon(0% 0%, 70% 0, 100% 30%, 100% 100%, 0 100%);
opacity: 0.5;
opacity: 0.3;
transition: 250ms ease;
z-index: 4;
}

.back-top-btn:is(:hover, :focus-visible){
.back-top-btn:is(:hover, :focus-visible) {
opacity: 1;
transform: translateY(-20px);
}
2 changes: 1 addition & 1 deletion src/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const Header = () => {
Experience Gaming Through
<br /> Latest <span style={{ color: "#5D3FD3" }}>Technologies</span>
</Heading>
<p>
<p style={{padding: "10px"}}>
Our success thrives on a dedicated, talented team to experience
gaming. Join us at the event.
</p>
Expand Down
28 changes: 24 additions & 4 deletions src/components/ToastComponent.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
import * as Toast from "@radix-ui/react-toast";
import { useEffect, useRef, useState } from "react";
import { useEffect, useState } from "react";
import "./toast.css";
import { RocketIcon } from "@radix-ui/react-icons";
import { HandIcon, HeartIcon, MixIcon, RocketIcon } from "@radix-ui/react-icons";

const ToastComponent = () => {
const [open, setOpen] = useState(false);
const [message, setMessage] = useState("Hi there! ");
const [icon, setIcon] = useState("heart");

useEffect(() => {
setTimeout(() => {
setOpen(true);
}, 1000);
setTimeout(() => {
setOpen(false);
}, 5000);
setTimeout(() => {
setOpen(true);
setMessage("Welcome to Zero Latency! ");
setIcon("rocket");
}, 6000);
setTimeout(() => {
setOpen(false);
}, 11000);
setTimeout(() => {
setOpen(true);
setMessage("Why wait, register now! ");
setIcon("game");
}, 15000);
}, []);

return (
<Toast.Provider swipeDirection="right">
<Toast.Root className="ToastRoot" open={open} onOpenChange={setOpen}>
<Toast.Title className="ToastTitle">
Welcome! to Zero Latency <br />
<RocketIcon />
{message}
{icon === "heart" && <HeartIcon />}
{icon === "rocket" && <RocketIcon />}
{icon === "game" && <MixIcon />}
</Toast.Title>
</Toast.Root>
<Toast.Viewport className="ToastViewport" />
Expand Down
10 changes: 7 additions & 3 deletions src/components/toast.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ button {
flex-direction: column;
padding: var(--viewport-padding);
gap: 10px;
width: 290px;
width: 250px;
max-width: 100vw;
margin: 0;
list-style: none;
Expand All @@ -21,14 +21,18 @@ button {
}

.ToastRoot {
border: 2px solid violet;
border-bottom: 2px solid violet;
border-right: 2px solid violet;
text-align: center;
background: rgb(16, 13, 42);
background: linear-gradient(
90deg,
rgba(16, 13, 42, 1) 0%,
rgba(16, 13, 42, 0.4962359943977591) 100%
);
border-radius: 6px;
border-top-left-radius: 30%;
border-bottom-left-radius: 30%;
border-top-right-radius: 30%;
box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px,
hsl(206 22% 7% / 20%) 0px 10px 20px -15px;
padding: 15px;
Expand Down
2 changes: 1 addition & 1 deletion src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as Toast from "@radix-ui/react-toast";
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<Theme appearance="inherit" accentColor="purple" radius="large">
<Toast.Provider duration={4000}>
<Toast.Provider duration={18000}>
<App />
</Toast.Provider>
</Theme>
Expand Down

0 comments on commit 5c26179

Please sign in to comment.