Icon
Renders an SVG from the icon set at a chosen size and colour shade.
| Prop | Type | Default | Notes |
|---|---|---|---|
icon |
String | required |
Icon file name without extension (app/assets/images/icons/). |
size |
String/Integer | nil |
16/nil (16px), 12 (12px); legacy "sm" (12px), "lg" (20px), "xs" (8px). |
shade |
String | nil |
Colour mask: primary/secondary/tertiary/white/red/green. |
solid |
Boolean | false |
Recolour the SVG fill instead of its stroke. |
Default
1 | <%= render IconComponent.new(icon: "bell") %> |
Large
1 | <%= render IconComponent.new(icon: "bell", size: "lg") %> |
Shaded
1 | <%= render IconComponent.new(icon: "bell", shade: "red") %> |
Small
1 | <%= render IconComponent.new(icon: "bell", size: "sm") %> |