File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
.search-bar {
2
2
width : 100% ;
3
- max-width : 100% ; /* Sets a maximum width for the bar, adjust as needed */
4
- margin : 0 auto 20px auto; /* Centering the search bar with margin */
3
+ max-width : 100% ;
4
+ margin : 0 auto 20px auto;
5
5
}
6
6
7
7
.search-input {
10
10
font-size : 16px ;
11
11
border : 1px solid # ccc ;
12
12
border-radius : 4px ;
13
- box-sizing : border-box; /* Ensures padding is included in the width calculation */
13
+ box-sizing : border-box;
14
14
}
15
15
16
16
.search-input : focus {
17
- border-color : # 007bff ; /* Change border color when focused */
17
+ border-color : # 007bff ;
18
18
}
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import React from 'react';
2
2
import { TextField } from '@material-ui/core' ;
3
3
import './Search.css' ;
4
4
import InputAdornment from '@material-ui/core/InputAdornment' ;
5
- import SearchIcon from '@material-ui/icons/Search' ; // Import the Search Icon
5
+ import SearchIcon from '@material-ui/icons/Search' ;
6
6
7
7
8
8
export default function Search ( { onSearch } ) {
9
9
const handleSearchChange = ( event ) => {
10
10
const query = event . target . value ;
11
- onSearch ( query ) ; // Pass the search query to parent component
11
+ onSearch ( query ) ;
12
12
} ;
13
13
14
14
return (
@@ -18,7 +18,7 @@ export default function Search({ onSearch }) {
18
18
variant = "outlined"
19
19
fullWidth
20
20
margin = "normal"
21
- onChange = { handleSearchChange } // Trigger onSearch on every change
21
+ onChange = { handleSearchChange }
22
22
placeholder = "Search..."
23
23
InputProps = { {
24
24
startAdornment : (
You can’t perform that action at this time.
0 commit comments