Skip to content

Commit

Permalink
fix styles for wrapping long tag names, add some padding
Browse files Browse the repository at this point in the history
  • Loading branch information
codebykat committed Oct 18, 2019
1 parent b0d89d6 commit 71c2dc2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/search-suggestions/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class SearchSuggestions extends Component {
<div className="search-suggestions">
<div className="search-suggestion-row" onClick={() => onSearch(query)}>
<SmallSearchIcon />
{query}
<div className="search-suggestion">{query}</div>
</div>
{shouldShowTagSuggestions &&
tags
Expand All @@ -37,7 +37,9 @@ export class SearchSuggestions extends Component {
onClick={() => onSearch(`tag:${tag.id}`)}
>
<TagIcon />
{decodeURIComponent(tag.id)}
<div className="search-suggestion">
{decodeURIComponent(tag.id)}
</div>
</div>
))}
</div>
Expand Down
7 changes: 7 additions & 0 deletions lib/search-suggestions/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@
left: 0;
z-index: 10;
width: 100%;
padding: 0 5px;
border-radius: 5px;
border: 1px solid $studio-gray-10;

.search-suggestion-row {
cursor: pointer;
padding: 5px;
position: relative;
}
.search-suggestion {
overflow-wrap: anywhere;
margin-left: 28px;
}

.icon-search-small, .icon-tag {
position: absolute;
transition: $anim-transition;
width: 24px;
}
Expand Down

0 comments on commit 71c2dc2

Please sign in to comment.