From 52d3d195e78965158e841265104189a7732f6e58 Mon Sep 17 00:00:00 2001 From: Harry Downing Date: Thu, 14 Jul 2022 18:10:52 +0100 Subject: [PATCH] Added NavBar, styled FiltercontrolPanel, and styled ViewSelect. --- .../ChannelSelect/ChannelSelect.css | 12 +++++++++ .../components/ChannelSelect/ChannelSelect.js | 21 ++++++++++----- .../FilterControlPanel/FilterControlPanel.css | 1 - .../FilterControlPanel/FilterControlPanel.js | 10 ++++--- .../components/GenreSelect/GenreSelect.css | 4 +-- .../src/components/GenreSelect/GenreSelect.js | 4 +-- my-app/src/components/Home/Home.css | 1 + my-app/src/components/Home/Home.js | 8 +++--- my-app/src/components/Nav/Nav.js | 8 ------ my-app/src/components/NavBar/NavBar.css | 24 +++++++++++++++++ my-app/src/components/NavBar/NavBar.js | 19 +++++++++++++ my-app/src/components/SearchBar/SearchBar.css | 14 +++------- my-app/src/components/SearchBar/SearchBar.js | 14 ++++------ .../src/components/ViewSelect/ViewSelect.css | 27 +++++++++++++++++++ .../src/components/ViewSelect/ViewSelect.js | 12 +++++---- 15 files changed, 127 insertions(+), 52 deletions(-) create mode 100644 my-app/src/components/ChannelSelect/ChannelSelect.css delete mode 100644 my-app/src/components/Nav/Nav.js create mode 100644 my-app/src/components/NavBar/NavBar.css create mode 100644 my-app/src/components/NavBar/NavBar.js create mode 100644 my-app/src/components/ViewSelect/ViewSelect.css diff --git a/my-app/src/components/ChannelSelect/ChannelSelect.css b/my-app/src/components/ChannelSelect/ChannelSelect.css new file mode 100644 index 00000000..2a51d6e4 --- /dev/null +++ b/my-app/src/components/ChannelSelect/ChannelSelect.css @@ -0,0 +1,12 @@ +.checkbox { + border: 1px solid grey; + border-radius: 5px; + display: flex; + align-items: center; +} + +.checkbox span { + flex-grow: 1; +} + + diff --git a/my-app/src/components/ChannelSelect/ChannelSelect.js b/my-app/src/components/ChannelSelect/ChannelSelect.js index 2022ffd4..6ce3c6ed 100644 --- a/my-app/src/components/ChannelSelect/ChannelSelect.js +++ b/my-app/src/components/ChannelSelect/ChannelSelect.js @@ -1,3 +1,5 @@ +import './ChannelSelect.css'; + const ChannelSelect = ({filter, setFilter}) => { const handleCheckChannel = (e) => { @@ -9,12 +11,19 @@ const ChannelSelect = ({filter, setFilter}) => { return (
- - - - - - +
Channels
+ + +
); } diff --git a/my-app/src/components/FilterControlPanel/FilterControlPanel.css b/my-app/src/components/FilterControlPanel/FilterControlPanel.css index 03940e85..69feb54e 100644 --- a/my-app/src/components/FilterControlPanel/FilterControlPanel.css +++ b/my-app/src/components/FilterControlPanel/FilterControlPanel.css @@ -10,6 +10,5 @@ details > summary { position: absolute; background-color: white; display: inline-block; - border: 1px solid grey; border-radius: 5px; } \ No newline at end of file diff --git a/my-app/src/components/FilterControlPanel/FilterControlPanel.js b/my-app/src/components/FilterControlPanel/FilterControlPanel.js index b33fc6fe..c877affe 100644 --- a/my-app/src/components/FilterControlPanel/FilterControlPanel.js +++ b/my-app/src/components/FilterControlPanel/FilterControlPanel.js @@ -13,12 +13,14 @@ const FilterControlPanel = ({ filter, setFilter }) => { Filter -
+
- - - {/* */} +
Other
+
diff --git a/my-app/src/components/GenreSelect/GenreSelect.css b/my-app/src/components/GenreSelect/GenreSelect.css index e269bf12..6377fdc1 100644 --- a/my-app/src/components/GenreSelect/GenreSelect.css +++ b/my-app/src/components/GenreSelect/GenreSelect.css @@ -1,3 +1,3 @@ -.dropdown { - display: inline-block; +.dropdown label { + display: block; } \ No newline at end of file diff --git a/my-app/src/components/GenreSelect/GenreSelect.js b/my-app/src/components/GenreSelect/GenreSelect.js index 97714b47..39baaf96 100644 --- a/my-app/src/components/GenreSelect/GenreSelect.js +++ b/my-app/src/components/GenreSelect/GenreSelect.js @@ -20,8 +20,8 @@ const GenreSelect = ({ filter, setFilter }) => { }, []); return ( -
- +
+
Genre
- - -
- + return ( +
+ + +
); } diff --git a/my-app/src/components/ViewSelect/ViewSelect.css b/my-app/src/components/ViewSelect/ViewSelect.css new file mode 100644 index 00000000..c1201932 --- /dev/null +++ b/my-app/src/components/ViewSelect/ViewSelect.css @@ -0,0 +1,27 @@ +#grid-view-radio { + display: none; +} + +#list-view-radio { + display: none; +} + +.view-box { + border-radius: 5px; +} + +.view-box #grid-view-radio + label { + border-right: 1px solid lightgrey; +} + +#grid-view-radio + label, #list-view-radio + label { + transition: background-color .7s; +} + +#grid-view-radio:checked + label { + background-color: lightgrey; +} + +#list-view-radio:checked + label { + background-color: lightgrey; +} diff --git a/my-app/src/components/ViewSelect/ViewSelect.js b/my-app/src/components/ViewSelect/ViewSelect.js index ceb1ff81..c67f7b0f 100644 --- a/my-app/src/components/ViewSelect/ViewSelect.js +++ b/my-app/src/components/ViewSelect/ViewSelect.js @@ -1,3 +1,5 @@ +import './ViewSelect.css'; + const ViewSelect = ({view, setView}) => { const handleViewChange = (e) => { @@ -9,11 +11,11 @@ const ViewSelect = ({view, setView}) => { }; return ( -
- - - - +
+ + + +
); }