diff --git a/src/defaultStyles.css b/src/defaultStyles.css index 7a35e51..52470ca 100644 --- a/src/defaultStyles.css +++ b/src/defaultStyles.css @@ -215,15 +215,6 @@ a { color: black; } -.searchBar { - margin: 10px; - width: 100%; - color: white; - background-color: #212127; - border: none; - font-size: 18px; -} - .subjItem:hover:not(.activeSubjItem) { background-color: #555; color: white; diff --git a/src/pages/allQuestions.js b/src/pages/allQuestions.js index 93820b2..6ecfd18 100644 --- a/src/pages/allQuestions.js +++ b/src/pages/allQuestions.js @@ -4,6 +4,7 @@ import fetch from 'unfetch' import LoadingIndicator from '../components/LoadingIndicator.js' import QuestionSearchResult from '../components/QuestionSearchResult.js' +import styles from './allQuestions.module.css' import constants from '../constants.json' export default function AllQuestions (props) { @@ -23,14 +24,22 @@ export default function AllQuestions (props) { if (data) { return (
-
+
{ setSearchTerm(e.target.value) }} /> +

diff --git a/src/pages/allQuestions.module.css b/src/pages/allQuestions.module.css new file mode 100644 index 0000000..eaea0fc --- /dev/null +++ b/src/pages/allQuestions.module.css @@ -0,0 +1,22 @@ +.searchBar { + margin: 10px; + color: white; + background-color: #212127; + border: none; + font-size: 18px; + flex-grow: 1; +} + +.searchContainer { + width: 100%; + display: flex; +} + +.clearButton { + width: 80px; + background-color: var(--background-color); + color: white; + font-size: 23px; + cursor: pointer; + border: none; +} diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 4a9213a..d1e811b 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -7,6 +7,7 @@ text-decoration: none; display: inline-block; font-size: 16px; + margin: 5px; } .motdHeader { diff --git a/src/pages/subjectBrowser.js b/src/pages/subjectBrowser.js index 59d7351..9a58b16 100644 --- a/src/pages/subjectBrowser.js +++ b/src/pages/subjectBrowser.js @@ -5,9 +5,10 @@ import LoadingIndicator from '../components/LoadingIndicator.js' import Subject from '../components/Subject.js' import SubjectSelector from '../components/SubjectSelector.js' +import styles from './subjectBrowser.module.css' import constants from '../constants.json' -export default function AllQuestions (props) { +export default function SubjectBrowser (props) { const [data, setData] = useState(null) const [activeSubjName, setActiveSubjName] = useState('') const [searchTerm, setSearchTerm] = useState('') @@ -30,14 +31,22 @@ export default function AllQuestions (props) { return (
-
+
{ setSearchTerm(e.target.value) }} /> +