Sha256: f8f63ed54abebc976ca3db5398b7590127f49aa0d5406d5bc42df206077b5a19
Contents?: true
Size: 1.7 KB
Versions: 32
Compression:
Stored size: 1.7 KB
Contents
# frozen_string_literal: true module Satis module Tab class Component < Satis::ApplicationComponent attr_reader :name, :icon, :badge, :id, :tab_menu, :menu, :selected, :dirty, :padding, :title, :responsive, :options, :selected_tab_index def initialize(name = nil, icon: nil, badge: nil, id: nil, tab_menu: nil, menu: nil, padding: false, dirty: false, title: nil, responsive: false, options: nil, selected_tab_index: nil, selected: false, &block) super @name = name @icon = icon @id = id || name.to_s.underscore @badge = badge @padding = padding @dirty = dirty @title = title @responsive = responsive @selected = selected @menu = menu # FIXME: Obsolete these if tab_menu.present? @menu ||= tab_menu ActiveSupport::Deprecation.warn('Calling tab with the tab_menu parameter, use menu instead') end if selected_tab_index.present? @selected_tab_index = selected_tab_index # use selected ActiveSupport::Deprecation.warn('Calling tab with the selected_tab_index parameter, use selected instead') end @block = block end def responsive? responsive == true end def selected? selected == true end def dirty? dirty == true end def call content end end end end
Version data entries
32 entries across 32 versions & 1 rubygems