Skip to content

Commit b7c0c7a

Browse files
fix search bar
1 parent 0e79f1e commit b7c0c7a

File tree

2 files changed

+28
-23
lines changed

2 files changed

+28
-23
lines changed
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
import React from 'react'
2-
import styles from './SearchBar.module.css'
1+
import React from 'react';
2+
import styles from './SearchBar.module.css';
33

4-
const SearchBar = () => {
5-
return (
6-
<input type="search" placeholder="Search..." className={styles.SearchBar}/>
7-
)}
4+
const SearchBar = ({ onChange }) => {
5+
return (
6+
<input
7+
type='search'
8+
placeholder='Search...'
9+
className={styles.SearchBar}
10+
onChange={onChange}
11+
/>
12+
);
13+
};
814

9-
export default SearchBar
15+
export default SearchBar;
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
21
.SearchBar {
3-
border: 1px solid white;
4-
display: block;
5-
float: right;
6-
width: 285px;
7-
height: 30px;
8-
padding-left: 15px;
9-
padding-right: 15px;
10-
border-radius: 15px;
11-
background-image: url("search_icon.png");
12-
background-repeat: no-repeat;
13-
background-position: 97% 50%;
2+
border: 1px solid white;
3+
display: block;
4+
float: right;
5+
width: 80%;
6+
height: 50px;
7+
padding-left: 15px;
8+
padding-right: 15px;
9+
border-radius: 15px;
10+
background-image: url('search_icon.png');
11+
background-repeat: no-repeat;
12+
background-position: 97% 50%;
1413

15-
background-size: 16px;
14+
background-size: 16px;
1615
}
1716

18-
.SearchBar:focus{
19-
outline: none;
20-
}
17+
.SearchBar:focus {
18+
outline: none;
19+
}

0 commit comments

Comments
 (0)