class NfgUi::Components::Elements::Badge
Badge
doesn't have any customizations unique to the design system yet As such, the NFG UI
badge is simply a bootstrap badge behind the scenes. Traits
will eventually be connected here.
Public Instance Methods
render() { |: body)| ... }
click to toggle source
Calls superclass method
NfgUi::Bootstrap::Components::Base#render
# File lib/nfg_ui/components/elements/badge.rb, line 20 def render super do if icon NfgUi::Components::Foundations::Icon.new({ traits: [icon], text: body }, view_context).render else (block_given? ? yield : body) end end end