From aee30f0c6b673869053aef46a8e904c4f4b3755b Mon Sep 17 00:00:00 2001 From: Sonika Date: Mon, 1 Jan 2024 14:27:37 +0530 Subject: [PATCH] search component --- src/components/search/Search.tsx | 68 +++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/src/components/search/Search.tsx b/src/components/search/Search.tsx index bc55115..c4db4d7 100644 --- a/src/components/search/Search.tsx +++ b/src/components/search/Search.tsx @@ -1,11 +1,69 @@ -import { Paper } from "@mui/material"; -import React from "react"; +import { Button, Grid, Paper, TextField } from "@mui/material"; +import React, { useState } from "react"; export default function Search(){ + + const [searchText, setSearchText] = useState(''); + + const handleSearch = () => { + // Implement your search logic here using searchText + console.log('Search:', searchText); + }; + + const handleClear = () => { + setSearchText(''); + }; + + const handleAdvancedFilter = () => { + // Implement your advanced filter logic here + console.log('Advanced Filter'); + }; + return ( - - - + + + + + setSearchText(e.target.value)} + sx={{ + width: '50%', + '& label.Mui-focused': { + color: 'white', // Label color when focused + }, + '& .MuiOutlinedInput-root': { + '& fieldset': { + borderColor: 'white', // Border color + }, + '&:hover fieldset': { + borderColor: 'white', // Border color on hover + }, + '&.Mui-focused fieldset': { + borderColor: 'white', // Border color when focused + }, + }, + '& input': { + color: 'white', // Input text color + }, + marginTop:2 + }} + /> + + + + + + + )