Octicon
renders an Octicon with System arguments.
Octicon
can also be rendered with the primer_octicon
helper, which accepts the same arguments.
Arguments
Name | Type | Default | Description |
---|
icon_name | Symbol, String | nil | Name of Octicon to use. |
icon | Symbol, String | nil | Name of Octicon to use. |
size | Symbol | :small | One of :small (16 ) and :medium (24 ). |
use_symbol | Boolean | false | EXPERIMENTAL (May change or be removed) - Set to true when using with OcticonSymbols. |
system_arguments | Hash | N/A | System arguments |
Examples
Default
<%= render(Primer::OcticonComponent.new(:check)) %>
<%= render(Primer::OcticonComponent.new(icon: :check)) %>
Medium
<%= render(Primer::OcticonComponent.new(:people, size: :medium)) %>
Helper
<%= primer_octicon(:check) %>