0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Renamed gh-search-input-trigger -> gh-power-select/input-trigger

refs https://github.com/TryGhost/Team/issues/973

- we have more uses for an input-based trigger for a power select component so the rename prepares the input-based trigger we use for the site search for more general usage
- removed hardcoded search icon and class, they can be passed in as options via the `@extra` param
This commit is contained in:
Kevin Ansfield 2021-08-16 15:02:54 +01:00
parent fd59421c7a
commit 4a24e0a089
3 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,7 @@
<div class="ember-power-select-search" {{on "mousedown" this.captureMousedown}}>
{{svg-jar "search" class="gh-nav-search-icon"}}
{{#if @extra.inputIcon}}
{{svg-jar @extra.inputIcon class=@extra.inputIconClass}}
{{/if}}
<input type="search"
{{autofocus}}
{{did-insert this.registerInput}}

View file

@ -3,9 +3,13 @@
@onChange={{action "openSelected"}}
@placeholder="Search site..."
@searchEnabled={{false}}
@triggerComponent="gh-search-input-trigger"
@triggerComponent="gh-power-select/input-trigger"
@renderInPlace={{true}}
@loadingMessage="Loading"
@extra={{hash
inputIcon="search"
inputIconClass="gh-nav-search-icon"
}}
as |name select|
>
{{highlighted-text name.title select.searchText}}