Sha256: 46511e6f02510f59664c9448fdf10ca325162ce541c0ccb095c74d5dea22ea1c
Contents?: true
Size: 613 Bytes
Versions: 19
Compression:
Stored size: 613 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) return nil unless bottom_values.include? value "bottom_#{value}" end.compact.join(" ") end end end
Version data entries
19 entries across 19 versions & 1 rubygems