From 19d9b8c7d240cebac458bb06fb695ccfefb43775 Mon Sep 17 00:00:00 2001 From: rektdeckard Date: Tue, 21 Jul 2020 23:07:36 -0400 Subject: [PATCH] Scaffold out UI components --- package.json | 1 + src/assets/wifi-none.svg | 2 +- src/components/App/App.css | 78 ++- src/components/App/App.tsx | 28 +- src/components/ColorInput/ColorInput.tsx | 33 ++ src/components/Footer/Footer.css | 6 + src/components/Footer/Footer.tsx | 23 + src/components/Header/Header.css | 8 + src/components/Header/Header.tsx | 21 + src/components/IconGrid/IconGrid.css | 3 +- src/components/IconGrid/IconGrid.tsx | 62 +- src/components/SearchInput/SearchInput.css | 32 + src/components/SearchInput/SearchInput.tsx | 33 ++ src/components/SizeInput/SizeInput.css | 56 ++ src/components/SizeInput/SizeInput.tsx | 38 ++ src/components/StyleInput/StyleInput.tsx | 37 ++ src/components/Toolbar/Toolbar.css | 11 + src/components/Toolbar/Toolbar.tsx | 55 +- src/components/index.ts | 6 + src/lib/iconList.ts | 368 ------------ src/lib/icons.ts | 642 +++++++++++++++++++++ src/lib/{Icon.ts => index.ts} | 9 +- src/state/atoms.ts | 4 +- src/state/selectors.ts | 35 +- 24 files changed, 1063 insertions(+), 528 deletions(-) create mode 100644 src/components/ColorInput/ColorInput.tsx create mode 100644 src/components/Footer/Footer.css create mode 100644 src/components/Footer/Footer.tsx create mode 100644 src/components/Header/Header.css create mode 100644 src/components/Header/Header.tsx create mode 100644 src/components/SearchInput/SearchInput.css create mode 100644 src/components/SearchInput/SearchInput.tsx create mode 100644 src/components/SizeInput/SizeInput.css create mode 100644 src/components/SizeInput/SizeInput.tsx create mode 100644 src/components/StyleInput/StyleInput.tsx delete mode 100644 src/lib/iconList.ts create mode 100644 src/lib/icons.ts rename src/lib/{Icon.ts => index.ts} (76%) diff --git a/package.json b/package.json index 560f506..b171f03 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@types/react-list": "^0.8.5", "@types/react-virtualized": "^9.21.10", "framer-motion": "^2.1.0", + "phosphor-react": "^0.1.2", "react": "^16.13.1", "react-dom": "^16.13.1", "react-list": "^0.8.15", diff --git a/src/assets/wifi-none.svg b/src/assets/wifi-none.svg index e323ee1..4ec80c1 100644 --- a/src/assets/wifi-none.svg +++ b/src/assets/wifi-none.svg @@ -5,7 +5,7 @@ - + diff --git a/src/components/App/App.css b/src/components/App/App.css index a3c3134..9a94f2b 100644 --- a/src/components/App/App.css +++ b/src/components/App/App.css @@ -1,38 +1,62 @@ -.App { - text-align: center; +body { + margin: 0px; + font-family: monospace; } -.App-logo { - height: 40vmin; - pointer-events: none; +button, select { + margin: 4px; + padding: 8px; + border: 1px solid black; + border-radius: 24px; + background-color: white; } -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } +button:focus, select:focus { + outline: none; + border: 1px solid violet; + border-radius: 24px; } -.App-header { - background-color: #282c34; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; +button:active { + background-color: lightblue; } -.App-link { - color: #61dafb; - size: 1em; +input[type="color"] { + border: 1px solid black; + border-radius: 24px; } -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } +input[type="color" i] { + -webkit-appearance: square-button; + width: 32px; + height: 32px; } + +#color-picker { + padding: 0px; + border-radius: 100%; + height: 32px; + width: 32px; + border: none; + outline: none; + -webkit-appearance: none; +} + +#color-picker::-webkit-color-swatch { + border: none; + border-radius: 50%; +} + +/* input { + margin: 4px; + padding: 8px; + border: 2px solid black; + border-radius: 24px; + background-color: transparent; +} + +input:focus { + outline: none; + border: 2px solid violet; + border-radius: 24px; +} */ \ No newline at end of file diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index fa77402..dcbcaff 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -1,22 +1,18 @@ import React from "react"; -import { Toolbar, IconGrid } from "../"; -const App = () => { +import { Header, Toolbar, IconGrid, Footer } from "../"; +import "./App.css"; + +const App: React.FC = () => { return ( -
-
-

Phosphor Icons

- - on the play store - -
- - -
+ <> +
+
+ + +
+