Skip to content

Commit

Permalink
feat: convert rails icon to pine
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflips committed May 21, 2024
1 parent fa9533b commit 86c0503
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
1 change: 0 additions & 1 deletion docs/app/views/examples/components/icon/_preview.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<%= sage_component SageIcon, { icon: "pen", label: "Edit", color: "primary-300" } %>
<%= sage_component SageIcon, { icon: "preview-on", label: "Preview", color: "sage-300" } %>
<%= sage_component SageIcon, { icon: "trash", label: "Delete", color: "red-300" } %>
<pds-icon icon="youtube" color="#006699"></pds-icon>
</div>

<%= sage_component SageDivider, {} %>
Expand Down
17 changes: 6 additions & 11 deletions docs/lib/sage_rails/app/views/sage_components/_sage_icon.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,16 @@ end
<% end %>
>
<% end %>
<i class="
sage-icon
<pds-icon
name="<%= "#{component.icon}"%>"
class="
<%= "t-sage--color-#{component.color}" if component.color.present? %>
<%= "sage-icon-#{component.icon}" %><%= "-#{component.size}" if component.size.present? %>
<%= "sage-icon--adjacent-type-#{component.adjacent_type}" if component.adjacent_type %>
<%= "t-sage--color-#{component.color}" if component.color.present? %>
<%= component.generated_css_classes %>
"
<% if component.label.present? %>
aria-label="<%= component.label %>"
role="img"
<% else %>
aria-hidden=true
<% end %>
<%= component.generated_html_attributes.html_safe %>
></i>
size="<%= "#{component.size}" if component.size.present? %>"
></pds-icon>
<% if component.card_color.present? %>
</div>
<% end %>
Expand Down
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 @@ -63,7 +63,7 @@ $-icon-beside-type: (
height: $size;

&::before {
@include sage-icon-base($icon-name, $size-name);
@include sage-icon-base($icon-name, $size-name, pine);
}
}
}
Expand Down

0 comments on commit 86c0503

Please sign in to comment.