Updated the style of the buttons

This commit is contained in:
Tiago Ribeiro
2023-03-07 18:35:16 +00:00
parent 94065e453f
commit 84839c8bc9
3 changed files with 10 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import {useState} from "react";
import {Module} from "@/interfaces";
import clsx from "clsx";
import {useRouter} from "next/router";
import {errorButtonStyle, infoButtonStyle} from "@/constants/buttonStyles";
export default function Home() {
const [selectedModules, setSelectedModules] = useState<Module[]>([]);
@@ -105,15 +106,13 @@ export default function Home() {
</div>
</div>
<div className="w-full flex justify-between">
<button
onClick={() => router.push("/")}
className="btn btn-wide bg-red-500 bg-opacity-50 hover:bg-opacity-100 hover:bg-red-500 border-red-500 border-2 hover:border-red-500 disabled:text-white gap-4 relative text-white">
<button onClick={() => router.push("/")} className={clsx("btn btn-wide gap-4 relative text-white", errorButtonStyle)}>
<div className="absolute left-4">
<Icon path={mdiArrowLeft} color="white" size={1} />
</div>
Back
</button>
<button className="btn btn-wide bg-blue-500 bg-opacity-50 hover:bg-opacity-100 hover:bg-blue-500 border-blue-500 border-2 hover:border-blue-500 gap-4 relative text-white">
<button className={clsx("btn btn-wide gap-4 relative text-white", infoButtonStyle)}>
Start
<div className="absolute right-4">
<Icon path={mdiArrowRight} color="white" size={1} />

View File

@@ -8,6 +8,8 @@ import Navbar from "@/components/Navbar";
import Icon from "@mdi/react";
import {mdiPlus} from "@mdi/js";
import Link from "next/link";
import clsx from "clsx";
import {infoButtonStyle} from "@/constants/buttonStyles";
const inter = Inter({subsets: ["latin"]});
@@ -24,7 +26,7 @@ export default function Home() {
<Navbar />
<div className="w-full h-full p-4 relative">
<Link href="/exam">
<button className="btn btn-primary gap-2 right-4 absolute">
<button className={clsx("btn gap-2 right-4 absolute", infoButtonStyle)}>
<Icon path={mdiPlus} color="white" size={1} />
New Exam
</button>