Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution Button border color changed #246

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: yarn install && yarn run build
command: yarn run dev


17 changes: 5 additions & 12 deletions src/components/Error/ErrorCard.jsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
import React, { useState } from "react";
import useColorBorderBox from "../../hooks/useColorBorderBox"
import {
MdOutlineArrowRightAlt,
} from "react-icons/md";
import useColorBorderBox from "../../hooks/useColorBorderBox";
import { MdOutlineArrowRightAlt } from "react-icons/md";
import ErrorType from "./ErrorType";
import "./css/style.css";

import ModalSolutions from "./ModalSolutions";

function ErrorCard({ error }) {

const [readMore, setReadMore] = useState(false);
const [isOpenModal, setOpenModal] = useState(false);
const [solution, setSolution] = useState("");
const { borderColor } = useColorBorderBox(error)
const { borderColor } = useColorBorderBox(error);

return (
<div
id="main-div"
className={borderColor + " relative"}
>
<div id="main-div" className={borderColor + " relative"}>
<h3 className="title">{error.title}</h3>
<div className="absolute h-full -right-2 -top-2">
<ErrorType type={error.type} />
Expand All @@ -45,7 +38,7 @@ function ErrorCard({ error }) {
</div>

<button
className="flex mt-2 items-center gap-2 px-3 py-2 border border-white/40 rounded-lg hover:border-primary hover:text-primary"
className="flex mt-2 items-center gap-2 px-3 py-2 border border-black dark:border-white rounded-lg hover:border-primary hover:text-primary"
onClick={() => setOpenModal((prev) => !prev)}
>
<span className="text-xs">Solution</span>
Expand Down