Sha256: db398b6e4c4307d2ac12c5524d76da0f3873295e471a42380ecdf8c2ab2df80e
Contents?: true
Size: 786 Bytes
Versions: 1
Compression:
Stored size: 786 Bytes
Contents
# frozen_string_literal: true module Playbook module Bottom def self.included(base) base.prop :bottom end def bottom_values %w[0 xxs xs sm md lg xl auto initial inherit] end def bottom_options { bottom: "bottom", } end private def bottom_props selected_props = bottom_options.keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| value = send(k) css = if value.is_a?(Hash) && value[:inset] && bottom_values.include?(value[:value]) "bottom_#{value[:value]}_inset" elsif bottom_values.include?(value) "bottom_#{value}" end css end.compact.join(" ") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
playbook_ui-13.21.0.pre.alpha.PBNTR243globalpositioningpropinset2504 | lib/playbook/bottom.rb |