-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(recentSearches): add remove button (#326)
* feat(recentSearches): add remove button * pass refresh to getSources * update styles * rename delete to remove and add title * remove return null * extract icon * update styles * bump the version * remove unecessary typing * wrap with a sub-container * export style
- Loading branch information
Eunjae Lee
authored
Oct 1, 2020
1 parent
a5aaf1e
commit 648f1e8
Showing
13 changed files
with
108 additions
and
18 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
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
4 changes: 4 additions & 0 deletions
4
packages/autocomplete-plugin-recent-searches/src/recentIcon.ts
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,4 @@ | ||
export const recentIcon = `<svg viewBox="0 0 22 22" width="20" height="20" fill="currentColor"> | ||
<path d="M0 0h24v24H0z" fill="none"/> | ||
<path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/> | ||
</svg>`; |
11 changes: 11 additions & 0 deletions
11
packages/autocomplete-plugin-recent-searches/src/resetIcon.ts
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,11 @@ | ||
// copied from autocomplete-js | ||
export const resetIcon = `<svg width="20" height="20" viewBox="0 0 20 20"> | ||
<path | ||
d="M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z" | ||
stroke="currentColor" | ||
fill="none" | ||
fill-rule="evenodd" | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
></path> | ||
</svg>`; |
21 changes: 21 additions & 0 deletions
21
packages/autocomplete-plugin-recent-searches/src/style.css
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,21 @@ | ||
.aa-RecentSearchesItem { | ||
display: flex; | ||
flex-grow: 1; | ||
justify-content: space-between; | ||
} | ||
|
||
.aa-RecentSearchesItem .leftItems { | ||
display: flex; | ||
} | ||
|
||
.aa-RecentSearchesItem .removeButton { | ||
border: 0; | ||
background-color: transparent; | ||
cursor: pointer; | ||
opacity: 0.8; | ||
} | ||
|
||
.aa-RecentSearchesItem .removeButton:hover { | ||
opacity: 1; | ||
color: #000; | ||
} |
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 @@ | ||
export * from '../dist/esm/style.css'; |