diff --git a/docs/app/views/examples/components/icon/_preview.html.erb b/docs/app/views/examples/components/icon/_preview.html.erb index e3b5cf5168..b4d9ab5b97 100644 --- a/docs/app/views/examples/components/icon/_preview.html.erb +++ b/docs/app/views/examples/components/icon/_preview.html.erb @@ -1,111 +1,83 @@ -
Body Lorem ipsum dolor sit
+To change the color of the icon, pass a color name to the color
prop. Color values are defined in Figma and include values like primary-300
, sage-300
, red-300
, etc.
Body Small Lorem ipsum dolor sit
+ +<%= sage_component SageDivider, {} %> + +Size can be used to increase or decrease the size of the icon. The default size is md
. See Property tab for available values.
<%= "danger" %>
- <%= sage_component SageIcon, { icon: "danger", card_color: "danger" } %> - <%= sage_component SageIcon, { icon: "danger", card_color: "danger", circular: true } %> - <% end %> - - <%= sage_component SageCardListItem, { grid_template: "o" } do %> -<%= "draft" %>
- <%= sage_component SageIcon, { icon: "draft", card_color: "draft" } %> - <%= sage_component SageIcon, { icon: "draft", card_color: "draft", circular: true } %> - <% end %> - - <%= sage_component SageCardListItem, { grid_template: "o" } do %> -<%= "info" %>
- <%= sage_component SageIcon, { icon: "info-circle", card_color: "info" } %> - <%= sage_component SageIcon, { icon: "info-circle", card_color: "info", circular: true } %> - <% end %> - - <%= sage_component SageCardListItem, { grid_template: "o" } do %> -<%= "locked" %>
- <%= sage_component SageIcon, { icon: "lock", card_color: "locked" } %> - <%= sage_component SageIcon, { icon: "lock", card_color: "locked", circular: true } %> - <% end %> - - <%= sage_component SageCardListItem, { grid_template: "o" } do %> -<%= "published" %>
- <%= sage_component SageIcon, { icon: "window-paragraph", card_color: "published" } %> - <%= sage_component SageIcon, { icon: "window-paragraph", card_color: "published", circular: true } %> - <% end %> - - <%= sage_component SageCardListItem, { grid_template: "o" } do %> -<%= "warning" %>
- <%= sage_component SageIcon, { icon: "warning", card_color: "warning" } %> - <%= sage_component SageIcon, { icon: "warning", card_color: "warning", circular: true } %> - <% end %> - - <%= sage_component SageCardListItem, { grid_template: "o" } do %> -<%= "kajabi" %>
- <%= sage_component SageIcon, { icon: "kajabi-filled", card_color: "primary" } %> - <%= sage_component SageIcon, { icon: "kajabi-filled", card_color: "primary", circular: true } %> - <% end %> -<% end %> +<%= sage_component SageDivider, {} %> + +Icons can be placed on a background by setting the card_color
property. See Property tab for available values.
<%= size == "md" ? "Default (#{size})" : size %>
- <%= sage_component SageIcon, { icon: "pen", size: (size == "md" ? nil : size), card_color: "draft" } %> - <%= sage_component SageIcon, { icon: "pen", size: (size == "md" ? nil : size), card_color: "draft", circular: true, } %> - <% end %> - <% end %> -<% end %> +Background sizes can be applied by setting the size
property. See Property tab for available values.
Custom background sizes can be applied by setting the background_width
and background_height
properties. These values are applied as inline styles, so they can be any valid CSS value. The background_width
property is required when using background_height
.
Icons can be made circular by setting the circular
property to true
.
The adjacent_type
property can be used to align an icon next to a heading or paragraph. This is useful for placing an icon next to a heading or paragraph in a variety of forms. The effect is that the icon's height
and line-height
are updated to match the spec responsively. This can be used in combination with the different icon sizes and also be used with a vareity of layout techniques or components such as CSS flexbox (used below) or grid templates within SageCardRow
or SagePanelRow
.
+