Skip to content

Commit

Permalink
Add description to NavSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
wenincode committed Nov 6, 2023
1 parent d1c6f00 commit 0b10672
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@key='Name'
@icon='server-cluster'
@placeholder='Search datacenters'
@description="WAN federated datacenters"
class='consul-datacenter-selector'
data-test-datacenter-disclosure-menu
as |Dropdown item|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

.hds-dropdown__content {
min-width: 15.5rem;
max-height: 500px;
}
}

Expand Down Expand Up @@ -95,6 +96,10 @@
.consul-side-nav__selector-title {
margin-top: 0.5rem;
}

.consul-side-nav__selector-description {
padding-top: 0.5rem;
}
}
}

Expand Down
8 changes: 6 additions & 2 deletions ui/packages/consul-ui/app/components/nav-selector/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
@text={{get @item @key}}
/>
<DD.Header @hasDivider={{true}}>
{{! <Hds::Text::Body @size='100' @color='faint'>WAN federated datacenters</Hds::Text::Body> }}
{{#if @description}}
<div class='consul-side-nav__selector-description'>
<Hds::Text::Body @size='100' @color='faint'>{{@description}}</Hds::Text::Body>
</div>
{{/if}}
<Hds::Form::TextInput::Base
@type='search'
@value={{this.search}}
Expand All @@ -29,7 +33,7 @@
/>
</DD.Header>
{{#if (eq this.filteredItems.length 0)}}
<DD.Description @text="No results" />
<DD.Description @text='No results' />
{{else}}
{{#each this.filteredItems as |item|}}
{{yield DD item}}
Expand Down

0 comments on commit 0b10672

Please sign in to comment.