Sha256: a4677aeab0c219471333b1adac2a8347ca758ee21bd2289cc01ffb133896423b
Contents?: true
Size: 1.1 KB
Versions: 17
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true module Playbook module PbAdvancedTable class TableSubrowHeader < Playbook::KitBase prop :column_definitions, type: Playbook::Props::Array, default: [] prop :depth prop :row prop :enable_toggle_expansion, type: Playbook::Props::Enum, values: %w[all header none], default: "header" prop :subrow_header, type: Playbook::Props::String, default: "" prop :collapsible_trail, type: Playbook::Props::Boolean, default: true prop :subrow_data_attributes, type: Playbook::Props::HashProp, default: {} def data Hash(prop(:data)).merge(subrow_data_attributes) end def classname generate_classname("pb_table_tr", "bg-silver", "pb_subrow_header", subrow_depth_classname, separator: " ") end private def subrow_depth_classname depth.positive? ? "depth-sub-row-#{depth}" : "" end end end end
Version data entries
17 entries across 17 versions & 1 rubygems