BaseButton
import Example from ‘../../src/@primer/gatsby-theme-doctocat/components/example’
Use BaseButton to render an unstyled <button> tag that can be customized.
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
tag |
Symbol |
:button |
One of :a, :button, or :summary. |
type |
Symbol |
:button |
One of :button, :reset, or :submit. |
size |
Symbol |
:md |
One of :lg, :md, :sm, :xl, or :xs. |
classes |
String |
"" |
Classes and attributes |
attributes |
Hash |
{} |
Classes and attributes |
Examples
Setting the size
<%= render(Ariadne::BaseButton.new(size: :xs)) { "I am an extra small button!" } %>
<%= render(Ariadne::BaseButton.new(size: :sm)) { "I am a small button!" } %>
<%= render(Ariadne::BaseButton.new(size: :md)) { "I am a medium button!" } %>
<%= render(Ariadne::BaseButton.new(size: :lg)) { "I am a large button!" } %>
<%= render(Ariadne::BaseButton.new(size: :xl)) { "I am an extra large button!" } %>
Have questions?
Still have questions? Talk to support.