Skip to content

Commit b37ca05

Browse files
author
Nabarun
committed
style: optimize elements for responsiveness
1 parent 8f008c6 commit b37ca05

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

components/StarsFilter.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function StarsFilter() {
3838

3939
return (
4040
<form
41-
className="w-full m-2 mx-auto mb-4 lg:w-2/4 form-control"
41+
className="w-full m-2 mx-auto mb-4 lg:w-2/4 form-control px-2"
4242
onSubmit={handleSubmit(onSubmit)}
4343
>
4444
<div className="flex gap-2 flex-col sm:flex-row">
@@ -47,7 +47,7 @@ export default function StarsFilter() {
4747
render={({ field }) => (
4848
<input
4949
type="number"
50-
className="w-3/5 text-neutral-100 m-auto sm:w-full pr-4 input input-bordered border-2023-bavarian-gold-2 focus:outline-2023-bavarian-gold-2 bg-transparent"
50+
className="w-3/5 text-neutral-100 m-auto sm:w-full pr-4 input input-bordered border-2023-bavarian-gold-2 focus:outline-2023-bavarian-gold-2 bg-transparent text-center md:text-left"
5151
{...field}
5252
onChange={e => {
5353
field.onChange(parseInt(e.target.value, 10));
@@ -63,7 +63,7 @@ export default function StarsFilter() {
6363
render={({ field }) => (
6464
<input
6565
type="number"
66-
className="w-3/5 text-neutral-100 m-auto sm:w-full pr-4 input input-bordered border-2023-bavarian-gold-2 focus:outline-2023-bavarian-gold-2 bg-transparent"
66+
className="w-3/5 text-neutral-100 m-auto sm:w-full pr-4 input input-bordered border-2023-bavarian-gold-2 focus:outline-2023-bavarian-gold-2 bg-transparent text-center md:text-left"
6767
{...field}
6868
onChange={e => {
6969
field.onChange(parseInt(e.target.value, 10));
@@ -75,9 +75,15 @@ export default function StarsFilter() {
7575
control={control}
7676
/>
7777

78-
<button className="btn btn-ghost ml-2 text-2023-manga-2 ring-1 ring-2023-manga-2" type="submit">
79-
Search
80-
</button>
78+
{/* Flex container to center the button */}
79+
<div className="flex justify-center items-center">
80+
<button
81+
className="btn btn-ghost text-2023-manga-2 ring-1 ring-2023-manga-2 mx-auto w-3/5 md:w-full"
82+
type="submit"
83+
>
84+
Search
85+
</button>
86+
</div>
8187
</div>
8288
</form>
8389
);

0 commit comments

Comments
 (0)