Sha256: 449de7ffb9bd19b1416ea70a5ac868ecb316d41e15b16736c32a51765bb05675
Contents?: true
Size: 590 Bytes
Versions: 22
Compression:
Stored size: 590 Bytes
Contents
module Spina module MainNavigation class SubNavComponent < ApplicationComponent renders_one :icon renders_one :links def initialize(name = :content) @name = name end def active? helpers.admin_section == @name end def button_classes if active? "opacity-100" else "opacity-50" end end def ul_classes if active? "md:translate-x-20 " else "translate-x-full" end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems