Skip to content

Commit d186dcb

Browse files
committed
fix: code clean
code clean
1 parent 7bc412f commit d186dcb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/ui/components/Search/Search.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.search-bar {
22
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;
55
}
66

77
.search-input {
@@ -10,9 +10,9 @@
1010
font-size: 16px;
1111
border: 1px solid #ccc;
1212
border-radius: 4px;
13-
box-sizing: border-box; /* Ensures padding is included in the width calculation */
13+
box-sizing: border-box;
1414
}
1515

1616
.search-input:focus {
17-
border-color: #007bff; /* Change border color when focused */
17+
border-color: #007bff;
1818
}

src/ui/components/Search/Search.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import React from 'react';
22
import { TextField } from '@material-ui/core';
33
import './Search.css';
44
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';
66

77

88
export default function Search({ onSearch }) {
99
const handleSearchChange = (event) => {
1010
const query = event.target.value;
11-
onSearch(query); // Pass the search query to parent component
11+
onSearch(query);
1212
};
1313

1414
return (
@@ -18,7 +18,7 @@ export default function Search({ onSearch }) {
1818
variant="outlined"
1919
fullWidth
2020
margin="normal"
21-
onChange={handleSearchChange} // Trigger onSearch on every change
21+
onChange={handleSearchChange}
2222
placeholder="Search..."
2323
InputProps={{
2424
startAdornment: (

0 commit comments

Comments
 (0)