RocketCommunicationsInc / astro-components

Other
24 stars 8 forks source link

Allow icons in rux-tree #169

Closed moaxcp closed 3 years ago

moaxcp commented 3 years ago

rux-tree only has icons for status but it would be more useful if normal icons could be used in the tree.

status: "critical",

What I would like is to set an icon.

icon: "settings",
markacianfrani commented 3 years ago

I agree! The good news is that we're currently working on a complete refresh of our astro components and this will be completely doable in the new release (tentative end of september). We've redesigned a lot of our APIs to be more declarative so you'll be able to do something like:

      <rux-tree>
        <rux-tree-node>
          <rux-icon icon="settings"></rux-icon>
          <!--anything goes here-->
          Level 1
          <rux-tree-node slot="node">
            Level 1.2

          </rux-tree-node>
        </rux-tree-node>
      </rux-tree>

If you're interested you can take a look at the new API at https://next--astro-stencil.netlify.app/?path=/story/components-tree--default-story and https://github.com/RocketCommunicationsInc/astro-components-stencil . This repo is currently in alpha and under heavy development

moaxcp commented 3 years ago

Thanks! rux-tree-node would make things much easier in templates.