Updated the style of the buttons
This commit is contained in:
4
src/constants/buttonStyles.tsx
Normal file
4
src/constants/buttonStyles.tsx
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
export const infoButtonStyle =
|
||||||
|
"bg-blue-500 bg-opacity-50 hover:bg-opacity-100 hover:bg-blue-500 border-blue-500 border-2 hover:border-blue-500 text-white";
|
||||||
|
export const errorButtonStyle =
|
||||||
|
"bg-red-500 bg-opacity-50 hover:bg-opacity-100 hover:bg-red-500 border-red-500 border-2 hover:border-red-500 text-white";
|
||||||
@@ -7,6 +7,7 @@ import {useState} from "react";
|
|||||||
import {Module} from "@/interfaces";
|
import {Module} from "@/interfaces";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import {useRouter} from "next/router";
|
import {useRouter} from "next/router";
|
||||||
|
import {errorButtonStyle, infoButtonStyle} from "@/constants/buttonStyles";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const [selectedModules, setSelectedModules] = useState<Module[]>([]);
|
const [selectedModules, setSelectedModules] = useState<Module[]>([]);
|
||||||
@@ -105,15 +106,13 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full flex justify-between">
|
<div className="w-full flex justify-between">
|
||||||
<button
|
<button onClick={() => router.push("/")} className={clsx("btn btn-wide gap-4 relative text-white", errorButtonStyle)}>
|
||||||
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">
|
|
||||||
<div className="absolute left-4">
|
<div className="absolute left-4">
|
||||||
<Icon path={mdiArrowLeft} color="white" size={1} />
|
<Icon path={mdiArrowLeft} color="white" size={1} />
|
||||||
</div>
|
</div>
|
||||||
Back
|
Back
|
||||||
</button>
|
</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
|
Start
|
||||||
<div className="absolute right-4">
|
<div className="absolute right-4">
|
||||||
<Icon path={mdiArrowRight} color="white" size={1} />
|
<Icon path={mdiArrowRight} color="white" size={1} />
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import Navbar from "@/components/Navbar";
|
|||||||
import Icon from "@mdi/react";
|
import Icon from "@mdi/react";
|
||||||
import {mdiPlus} from "@mdi/js";
|
import {mdiPlus} from "@mdi/js";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import clsx from "clsx";
|
||||||
|
import {infoButtonStyle} from "@/constants/buttonStyles";
|
||||||
|
|
||||||
const inter = Inter({subsets: ["latin"]});
|
const inter = Inter({subsets: ["latin"]});
|
||||||
|
|
||||||
@@ -24,7 +26,7 @@ export default function Home() {
|
|||||||
<Navbar />
|
<Navbar />
|
||||||
<div className="w-full h-full p-4 relative">
|
<div className="w-full h-full p-4 relative">
|
||||||
<Link href="/exam">
|
<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} />
|
<Icon path={mdiPlus} color="white" size={1} />
|
||||||
New Exam
|
New Exam
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user