diff --git a/ui/packages/consul-ui/app/styles/base/icons/README.mdx b/ui/packages/consul-ui/app/styles/base/icons/README.mdx index fe79e18004..4193e40fc3 100644 --- a/ui/packages/consul-ui/app/styles/base/icons/README.mdx +++ b/ui/packages/consul-ui/app/styles/base/icons/README.mdx @@ -1,5 +1,12 @@ # Iconography +_We recently started adopting the [@hashicorp/ember-flight-icons](https://flight-hashicorp.vercel.app/) package, in particular the +usage of the `` component to render icons. This enables us to use all the +icons listed [on the flight icons page](https://flight-hashicorp.vercel.app/). If an icon is not present in the flight-icons package, +you may resort to the techniques listed below._ + +--- + All our iconography uses native CSS properties for adding iconography from The Outside. You can also add icons using the same properties within `style=""` attributes, but you should think twice before adding decorative content into @@ -29,14 +36,14 @@ selectors. ```css .selector::before { - --icon-name: icon-aws-color; + --icon-name: icon-alert-circle; content: ''; } ``` ```css .selector::after { - --icon-name: icon-aws; + --icon-name: icon-alert-circle; --icon-color: rgb(var(---white)); content: ''; } @@ -48,7 +55,7 @@ icons in HTML using these CSS properties. ```hbs preview-template

{{yield}} - - + ``` - ## Deprecated Please prefer our Constructable `%placeholder` styles over singular CSS @@ -111,65 +114,56 @@ use `-mask`, use `-icon` instead: ```css .selector::before { - @extend %with-logo-consul-color-icon, %as-pseudo; + @extend %with-alert-circle-icon, %as-pseudo; } ``` ```hbs preview-template
- - - - {{this.size}} + + + + {{this.size}}
    -{{#each-in this.icons as |prop value|}} -{{#if (and - (not (includes prop (array '--icon-name' '--icon-color' '--icon-size' '--icon-resolution'))) - (not (string-includes prop '-24')) - ) -}} -{{#let - (string-replace (string-replace prop '-16' '') '--' '') -as |name|}} -
  • -
    -
    {{name}}
    -
    -
  • -{{/let}} -{{/if}} -{{/each-in}} + {{#each-in this.icons as |prop value|}} + {{#if + (and + (not (includes prop (array '--icon-name' '--icon-color' '--icon-size' '--icon-resolution'))) + (not (string-includes prop '-24')) + ) + }} + {{#let (string-replace (string-replace prop '-16' '') '--' '') as |name|}} +
  • +
    +
    {{name}}
    +
    +
  • + {{/let}} + {{/if}} + {{/each-in}}
``` -