Sha256: 37dfd8e2ae41057c42803afbddec160b118f8e08cfecf08defc560efa9ef1b53
Contents?: true
Size: 703 Bytes
Versions: 2
Compression:
Stored size: 703 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Yattho # Helper to share tab validation logic between components. # The component will raise an error if there are 0 or 2+ selected tabs. module TabNavHelper extend ActiveSupport::Concern EXTRA_ALIGN_DEFAULT = :left EXTRA_ALIGN_OPTIONS = [EXTRA_ALIGN_DEFAULT, :right].freeze def tab_nav_tab_classes(classes) class_names( "tabnav-tab", classes ) end def tab_nav_classes(classes) class_names( "tabnav", classes ) end def tab_nav_body_classes(classes) class_names( "tabnav-tabs", classes ) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yattho_view_components-0.1.1 | app/lib/yattho/tab_nav_helper.rb |
yattho_view_components-0.0.1 | app/lib/yattho/tab_nav_helper.rb |