Sha256: 75042562f3d01cb693b0167b4b3512a4a19120adf31c66691724461af9bb5d66

Contents?: true

Size: 856 Bytes

Versions: 393

Compression:

Stored size: 856 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbAdvancedTable
    class TableRow < Playbook::KitBase
      prop :id, type: Playbook::Props::String,
                default: ""
      prop :column_definitions, type: Playbook::Props::Array,
                                default: []
      prop :row
      prop :depth

      def classname
        generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
      end

      def td_classname
        generate_classname("id-cell", "chrome-styles", separator: " ")
      end

      def depth_accessors
        column_definitions.flat_map do |column|
          column[:cellAccessors] if column.key?(:cellAccessors)
        end.compact
      end

    private

      def subrow_depth_classname
        depth.positive? ? "depth-sub-row-#{depth}" : ""
      end
    end
  end
end

Version data entries

393 entries across 393 versions & 1 rubygems

Version Path
playbook_ui-14.7.0.pre.rc.8 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4316 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.7.0.pre.rc.7 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PBNTR576tooltiptruncatedformpills4312 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4305 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.7.0.pre.rc.6 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PBNTR576tooltiptruncatedformpills4304 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4303 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PBNTR576tooltiptruncatedformpills4296 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1550lazysizesupgrade4295 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4274 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1607dependencydisplayymlupdate4271 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1538READMEroot4262 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1538READMEroot4260 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1550lazysizesupgrade4257 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1538READMEroot4254 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1538READMEroot4251 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.7.0.pre.rc.5 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.6.2.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4247 app/pb_kits/playbook/pb_advanced_table/table_row.rb
playbook_ui-14.7.0.pre.rc.4 app/pb_kits/playbook/pb_advanced_table/table_row.rb