Skip to content

Commit

Permalink
feat(label): convert rails icon to pine
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflips committed May 24, 2024
1 parent 77c2ac2 commit e2bab36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions docs/lib/sage_rails/app/views/sage_components/_sage_label.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
<%= "type=button" if component.interactive_type %>
<%= component.generated_html_attributes.html_safe %>
/>
<% if component.icon %>
<pds-icon
name="<%= component.icon %>"
class="<%= SageClassnames::SPACERS::XS_RIGHT %> <%= "sage-label--icon--custom-color" if component.icon && component.custom_icon_color %>"
></pds-icon>
<% end %>
<span class="sage-label__value-text">
<%= component.value.html_safe %>
</span>
Expand All @@ -35,5 +41,9 @@
<% end %>
<% if component.interactive_type === :dropdown %>
<span class="sage-label__decor-icon sage-label__decor-icon--down-small"></span>
<pds-icon
name="down-small"
class="sage-label__decor-icon"
></pds-icon>
<% end %>
</span>
2 changes: 1 addition & 1 deletion packages/sage-assets/lib/stylesheets/components/_icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $-icon-beside-type: (
}

.sage-label--icon-#{$icon-name} .sage-label__value::before {
@include sage-icon-base($icon-name, md);
@include sage-icon-base($icon-name, md, pine);
align-self: center;
position: relative;
margin: 0 sage-spacing(xs) 0 0;
Expand Down

0 comments on commit e2bab36

Please sign in to comment.