From 0a0deb6c90b91e3a57c5a7f4b3bbe3d2c8b0c8d4 Mon Sep 17 00:00:00 2001 From: "Orace.A" Date: Thu, 27 Mar 2025 18:21:14 +0100 Subject: [PATCH] feat: enhance search input --- src/app/admin/admins/page.tsx | 7 +++++-- src/app/globals.css | 11 +++++++++-- src/components/floatingLabelInput.tsx | 27 +++++++++++++++++++++++---- src/types/index.ts | 2 +- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/app/admin/admins/page.tsx b/src/app/admin/admins/page.tsx index 234ae73..2a54fa2 100644 --- a/src/app/admin/admins/page.tsx +++ b/src/app/admin/admins/page.tsx @@ -9,7 +9,6 @@ import axios from "axios" import Image from "next/image" import { useSession } from "next-auth/react" import { DropdownMenu } from "radix-ui" -import Link from "next/link" import { icons } from "#/assets/icons" import { useState } from "react" import Form from "#/components/form/form" @@ -423,7 +422,11 @@ export default function Admins (){ /> - table.setGlobalFilter(value)} /> + table.setGlobalFilter(value)} + button={ + + } + /> diff --git a/src/app/globals.css b/src/app/globals.css index 27d7f81..83decf8 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -55,9 +55,16 @@ body { z-index: 1; } -.btn-floating { +.btn-floating-right { position: absolute; - right: 12px; + right: 8px; + top: 50%; + transform: translateY(-50%); +} + +.btn-floating-left { + position: absolute; + left: 8px; top: 50%; transform: translateY(-50%); } diff --git a/src/components/floatingLabelInput.tsx b/src/components/floatingLabelInput.tsx index be0b126..7cc4593 100644 --- a/src/components/floatingLabelInput.tsx +++ b/src/components/floatingLabelInput.tsx @@ -40,7 +40,7 @@ export default function FloatingLabelInput({ ))} - {button &&
{button}
} + {button &&
{button}
} ); @@ -59,7 +59,7 @@ export default function FloatingLabelInput({