Skip to content

Commit 8dad9e6

Browse files
smatthiesFrancine Melo Pêpecordulaaa
committed
Adjust the styling of the searchbar
Co-authored-by: Francine Melo Pêpe <[email protected]> Co-authored-by: [email protected] <[email protected]>
1 parent 0abe7df commit 8dad9e6

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

app/components/CoachList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { ReactNode } from "react";
33
export default function CoachList({ children }: { children: ReactNode }) {
44
return (
55
<div className="bg-slate-100">
6-
<section className="mx-auto block max-w-7xl gap-x-6 py-12 px-4 columns-sm">
6+
<section className="mx-auto block max-w-7xl gap-x-6 px-4 columns-sm">
77
{children}
88
</section>
99
</div>

app/components/CoachSearch.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import SearchBar from "./SearchBar";
1+
import SearchBar from "./SearchBar";
22

33

44
function CoachSearch() {
55
return (
6-
<div className="flex flex-row-reverse py-5 max-w-7xl mx-auto">
6+
<div className="flex flex-row flex-grow w-full lg:w-10 ">
77
<SearchBar />
88
</div>
99
);

app/components/SearchBar.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { Form } from "@remix-run/react";
2-
import React, { ChangeEvent, RefObject, useRef, useState } from 'react';
3-
import SearchIcon from "./icons/SearchIcon";
1+
import React, { ChangeEvent, useRef } from 'react';
42

53

64
const SearchBar = () => {
@@ -22,13 +20,13 @@ const SearchBar = () => {
2220

2321

2422
return (
25-
<div className="inline-flex gap-2">
23+
<div className="inline-flex gap-2 w-full lg:w-96">
2624
<input
2725
name="search"
2826
type="text"
2927

3028
placeholder="Suche..."
31-
className="text-[1rem] px-2 py-1 rounded-full hover:text-vsp-900 border border-vsp-400 active:border-vsp-900 focus:border-vsp-900 disabled:border-vsp-200"
29+
className="text-[1rem] px-2 py-1 rounded-full hover:text-vsp-900 border border-vsp-400 active:border-vsp-900 focus:border-vsp-900 disabled:border-vsp-200 w-full"
3230
value={inputValue}
3331
onChange={(e) => {handleInputChange(e)}}
3432
>

app/components/SpeakingTimeContent.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ export default function SpeakingTimeContent({
8787
ref={formRef}
8888
method="get"
8989
id="filter-form"
90-
className=""
90+
className="bg-slate-100"
9191
>
92-
<details open={false} className="mx-auto max-w-7xl py-8 px-4">
92+
<details open={false} className="mx-auto max-w-7xl pt-6 px-4">
9393
<summary
9494
className="inline-flex cursor-pointer items-center hover:text-vsp-500"
9595
onClick={() => setIsActive(!isActive)}
@@ -186,12 +186,16 @@ export default function SpeakingTimeContent({
186186
</noscript>
187187
</div>
188188
</details>
189-
<CoachSearch />
190-
</Form>
189+
<div className="py-6 px-4 max-w-7xl mx-auto flex justify-end lg:justify-between items-center flex-wrap">
191190

192-
<div className="text-m mx-auto max-w-7xl py-4 px-4 font-semibold text-slate-700">
191+
<CoachSearch />
192+
<div className="text-m font-semibold text-slate-700">
193193
{coachesAmount ? `${coachesAmount} ${t("result")}` : t("noResult")}
194194
</div>
195+
</div>
196+
</Form>
197+
198+
195199

196200
<div className="relative">
197201
{state.state === "loading" && (

0 commit comments

Comments
 (0)