baoagency / polaris_view_components

ViewComponents for Polaris Design System
https://polarisviewcomponents.org
MIT License
388 stars 54 forks source link

Support icon in avatar component #429

Closed remy727 closed 4 months ago

remy727 commented 4 months ago

WHY are these changes introduced?

Improve Avatar component

WHAT is this pull request doing?

Support icon in Avatar component

Usage

<%= polaris_avatar(icon: "StoreIcon") %>
remy727 commented 4 months ago

I added demo/app/previews/avatar_component_preview/icon.html.erb but I don't see new one on lookbook.

image

image

kirillplatonov commented 4 months ago

You need to add a corresponding method to demo/app/previews/avatar_component_preview.rb as well: https://github.com/baoagency/polaris_view_components/blob/main/demo/app/previews/avatar_component_preview.rb

remy727 commented 4 months ago

Lookbook is updated.

image