Skip to content

Commit

Permalink
wrap searchBar to align reset / delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed May 16, 2021
1 parent c7deddc commit 3add591
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 37 deletions.
72 changes: 35 additions & 37 deletions src/components/Views/FacetedSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -514,48 +514,46 @@ const FacetedSearch = ({
document.querySelectorAll(relocation)[0]
}
>
<SearchBar
placeholder="Suche"
autofocus="true"
actionProps={{
content: 'reset',
}}
uiProps={{
icon: 'search',
iconPosition: 'left',
onKeyUp: onKeyUpHandler,
class: 'searchbarinput',
}}
/>
<Icon
basic
icon
name="delete"
onClick={(event) => onResetHandler(event)}
/>
<div className="searchbar-wrapper">
<SearchBar
placeholder="Suche"
autofocus="true"
uiProps={{
icon: 'search',
iconPosition: 'left',
onKeyUp: onKeyUpHandler,
class: 'searchbarinput',
}}
/>
<Icon
basic
icon
name="delete"
onClick={(event) => onResetHandler(event)}
/>
</div>
</Portal>
) : (
<Grid relaxed style={{ padding: '2em 0' }}>
<Grid.Row>
<Grid.Column width={12}>
<SearchBar
placeholder="Suche"
autofocus="true"
actionProps={{
content: 'reset',
}}
uiProps={{
icon: 'search',
iconPosition: 'left',
onKeyUp: onKeyUpHandler,
}}
/>
<Icon
basic
icon
name="delete"
onClick={(event) => onResetHandler(event)}
/>
<div className="searchbar-wrapper">
<SearchBar
placeholder="Suche"
autofocus="true"
uiProps={{
icon: 'search',
iconPosition: 'left',
onKeyUp: onKeyUpHandler,
}}
/>
<Icon
basic
icon
name="delete"
onClick={(event) => onResetHandler(event)}
/>
</div>
</Grid.Column>
</Grid.Row>
</Grid>
Expand Down
11 changes: 11 additions & 0 deletions src/components/Views/less/springisnow-volto-searchkit-block.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@

@import (multiple) '../../theme.config';

.searchbar-wrapper {
display: flex;
align-items: baseline;
.ui.fluid.input > input {
width: unset !important;
}
.icon.delete {
cursor: pointer;
}
}

// .ui.grid > .row > .column.facetedsearch_filter {
.facetedsearch_filter {
&.cards {
Expand Down

0 comments on commit 3add591

Please sign in to comment.