Class: DesignSystem::Govuk::Builders::Button
- Inherits:
-
DesignSystem::Generic::Builders::Button
- Object
- DesignSystem::Generic::Builders::Base
- DesignSystem::Generic::Builders::Button
- DesignSystem::Govuk::Builders::Button
- Defined in:
- lib/design_system/govuk/builders/button.rb
Overview
This class provides GOVUK Button.
Direct Known Subclasses
Instance Method Summary collapse
- #render_button(content_or_options = nil, options = nil) ⇒ Object
- #render_start_button(text, href, options) ⇒ Object
Methods inherited from DesignSystem::Generic::Builders::Base
Methods included from Helpers::CssHelper
Methods included from DesignSystem::Generic::Builders::Concerns::BrandDerivable
Constructor Details
This class inherits a constructor from DesignSystem::Generic::Builders::Base
Instance Method Details
#render_button(content_or_options = nil, options = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/design_system/govuk/builders/button.rb', line 8 def ( = nil, = nil, &) = (, ) [:class] = "#{brand}-button" = () do || << style_class_hash[['style']] end if block_given? ( = nil, &) else (, ) end end |
#render_start_button(text, href, options) ⇒ Object
23 24 25 |
# File 'lib/design_system/govuk/builders/button.rb', line 23 def (text, href, ) render_start_tag(text, href, ) end |