diff --git a/src/App.scss b/src/App.scss index 2bb2cb0..7217523 100644 --- a/src/App.scss +++ b/src/App.scss @@ -1,3 +1,19 @@ +.inputs-actions { + display: flex; + gap: 20px; +} + +.checkbox-container { + display: flex; + flex: 1; + flex-direction: column; + justify-content: center; + height: 50px; + label input { + margin-right: 1rem; + } +} + .input-search { padding: 1rem; margin: 0 0 1rem; @@ -6,7 +22,7 @@ border: 1px solid var(--vtl-background); box-shadow: 0 0 0 1px #fff3; color: var(--vtl-text); - width: calc(100% - 2rem); + width: calc(100% - 190px); } .not-found { diff --git a/src/App.tsx b/src/App.tsx index 502c5a6..4ef8153 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,15 +1,29 @@ import ReactTechsLogos from "./components/ReactTechsLogos"; -import { useState } from "react"; -import NucleusReact from 'nucleus-react-js'; +import { useState, useEffect } from "react"; +import NucleusReact, { NucleusBox } from "nucleus-react-js"; import techs from "./components/ReactTechsLogos/techs"; import { configApp } from "./App.config"; import "./App.scss"; -// import ReactTechsLogos from 'react-techs-logos' function App() { const [search, setSearch] = useState(""); + const [showRaw, setShowRaw] = useState(() => { + return JSON.parse(localStorage.getItem("showRaw") || "false"); + }); + const [hiddenLabel, setHiddenLabel] = useState(() => { + return JSON.parse(localStorage.getItem("hiddenLabel") || "false"); + }); + + useEffect(() => { + localStorage.setItem("showRaw", JSON.stringify(showRaw)); + }, [showRaw]); + + useEffect(() => { + localStorage.setItem("hiddenLabel", JSON.stringify(hiddenLabel)); + }, [hiddenLabel]); + const filteredArray = techs - .filter((item: any) => { + .filter((item) => { const nameItem = item.name.toLowerCase(); return nameItem.includes(search.trim().toLowerCase()); }) @@ -17,16 +31,44 @@ function App() { return ( -
-

List of techs

- setSearch(e.target.value)} - placeholder="Search logo name..." + +
+ setSearch(e.target.value)} + placeholder="Search logo name..." + /> + +
+ + {!showRaw && ( + + )} +
+
+ + - + {!filteredArray.length && (

No logos found matching your search.

)} -
+
); } diff --git a/src/assets/techs/cisco.svg b/src/assets/techs/cisco.svg index 26f4d04..c0c5a45 100644 --- a/src/assets/techs/cisco.svg +++ b/src/assets/techs/cisco.svg @@ -5,6 +5,7 @@ version="1.1" fill="#049fd9" viewBox="0 -30 216 180" + class="tech-icon" > + - - diff --git a/src/assets/techs/qwik.svg b/src/assets/techs/qwik.svg index 554a1f2..fe45235 100644 --- a/src/assets/techs/qwik.svg +++ b/src/assets/techs/qwik.svg @@ -1,4 +1,4 @@ - +