This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made search bars clear on right click
- Loading branch information
1 parent
d1b18b6
commit 0506f43
Showing
7 changed files
with
79 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { Component } from 'react' | ||
import './search.css' | ||
|
||
class Search extends Component { | ||
render() { | ||
const { value, onChange, ...props } = this.props | ||
return <div className="search"> | ||
<input | ||
type="search" | ||
placeholder="All" | ||
value={value} | ||
onChange={e => onChange(e.target.value)} | ||
onContextMenu={() => onChange('')} | ||
{...props} /> | ||
</div> | ||
} | ||
} | ||
|
||
export default Search |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.bar .search { | ||
min-width: 100px; | ||
flex-grow: 5; | ||
position: relative; | ||
} | ||
|
||
.bar .search > input { | ||
padding-left: 20px; | ||
font-size: 12px; | ||
} | ||
|
||
.bar .search > input[type="search"]:focus { | ||
border-bottom: none; | ||
} | ||
|
||
.bar .search:hover { | ||
background-color: rgba(255,255,255,.05); | ||
} | ||
|
||
.bar .search:before { | ||
content: '🔍'; | ||
position: absolute; | ||
left: 4px; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
} | ||
|
||
.search { | ||
position: relative; | ||
} | ||
|
||
.search > input[type="search"] { | ||
padding-left: 20px; | ||
font-size: 12px; | ||
border-bottom: none; | ||
} | ||
|
||
.search:before { | ||
content: '🔍'; | ||
position: absolute; | ||
left: 4px; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
} |