HeroiconComponent
import Example from ‘../../src/@primer/gatsby-theme-doctocat/components/example’
Heroicon
renders an Heroicon with Classes and attributes.
Heroicon
can also be rendered with the heroicon
helper.
Arguments
Name | Type | Default | Description |
---|---|---|---|
tag |
Symbol, String |
:svg |
The rendered tag name |
classes |
String |
"" |
Classes and attributes |
icon |
Symbol, String |
N/A | Name of Heroicon to use. |
variant |
String |
N/A | One of outline , solid , or mini . |
size |
Symbol |
:md |
One of :xs (16 ), :sm (20 ), :md (24 ), or :lg (128 ). |
attributes |
Hash |
{} |
Classes and attributes |
text_classes |
String |
"" |
Classes and attributes |
text_attributes |
Hash |
{} |
Classes and attributes |
Examples
Default
<%= render(Ariadne::HeroiconComponent.new(icon: :check, variant: HeroiconsHelper::Icon::VARIANT_OUTLINE)) %>
<%= render(Ariadne::HeroiconComponent.new(icon: :check, variant: HeroiconsHelper::Icon::VARIANT_SOLID)) %>
Medium
<%= render(Ariadne::HeroiconComponent.new(icon: :"user-group", variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, size: :md)) %>
Helper
<%= ariadne_heroicon(icon: :check, variant: HeroiconsHelper::Icon::VARIANT_OUTLINE) %>
Have questions?
Still have questions? Talk to support.