From 70d09e6345a2071f0f4eb53ea735cb0b70766195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guillois?= Date: Tue, 18 Feb 2020 14:21:24 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Recherche=20dans=20les=20r=C3=A8?= =?UTF-8?q?gles:=20navigation=20clavier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/SearchBar.css | 8 ++++++ source/components/SearchBar.tsx | 44 ++++++++++++++++++++++++--------- 2 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 source/components/SearchBar.css diff --git a/source/components/SearchBar.css b/source/components/SearchBar.css new file mode 100644 index 000000000..0dc42725b --- /dev/null +++ b/source/components/SearchBar.css @@ -0,0 +1,8 @@ +li.active { + background: var(--color); + color: var(--textColor); +} + +li.active a { + color: var(--textColor); +} diff --git a/source/components/SearchBar.tsx b/source/components/SearchBar.tsx index fac84ea9e..c2fb1c251 100644 --- a/source/components/SearchBar.tsx +++ b/source/components/SearchBar.tsx @@ -8,6 +8,7 @@ import { Link, Redirect, useHistory } from 'react-router-dom' import { Rule } from 'Types/rule' import Worker from 'worker-loader!./SearchBar.worker.js' import { capitalise0 } from '../utils' +import './SearchBar.css' const worker = new Worker() @@ -29,19 +30,35 @@ export default function SearchBar({ const [input, setInput] = useState('') const [selectedOption, setSelectedOption] = useState