Sha256: 71ced214e9aa20ec2141fb3eac2503376405e3bf8980688673719e51545b9772
Contents?: true
Size: 1.4 KB
Versions: 130
Compression:
Stored size: 1.4 KB
Contents
# frozen_string_literal: true module NfgUi module Components module Elements # Nav doc coming soon class NavItem < NfgUi::Bootstrap::Components::NavItem include Bootstrap::Utilities::Tooltipable include NfgUi::Components::Utilities::Iconable include NfgUi::Components::Utilities::Describable include NfgUi::Components::Utilities::Renderable include NfgUi::Components::Utilities::Traitable include NfgUi::Components::Traits::Active include NfgUi::Components::Traits::Disable include NfgUi::Components::Traits::NavItem include NfgUi::Components::Traits::Remote def render content_tag(as, html_options) do if include_nav_link? concat(NfgUi::Components::Elements::NavLink.new({ body: (button ? button : (block_given? ? yield : body)), active: active, disabled: disabled, dropdown: dropdown, tab: tab, remote: remote, href: (tab || href), icon: icon }, view_context).render) if dropdown concat(block_given? ? yield : body) end else if icon NfgUi::Components::Foundations::Icon.new({ traits: [icon], text: (block_given? ? yield : body) }, view_context).render else (block_given? ? yield : body) end end end end end end end end
Version data entries
130 entries across 130 versions & 1 rubygems