Module: Playbook::MaxHeight
- Included in:
- KitBase
- Defined in:
- lib/playbook/max_height.rb
Constant Summary collapse
- MAX_HEIGHT_VALUES =
%w[auto xs sm md lg xl xxl xxxl].freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/playbook/max_height.rb', line 5 def self.included(base) base.prop :max_height end |
Instance Method Details
#max_height_options ⇒ Object
18 19 20 |
# File 'lib/playbook/max_height.rb', line 18 def { max_height: "max_height" } end |
#max_height_props ⇒ Object
11 12 13 14 15 16 |
# File 'lib/playbook/max_height.rb', line 11 def max_height_props value = max_height return nil unless value "max_height_#{value}" if MAX_HEIGHT_VALUES.include?(value.to_s) end |
#max_height_values ⇒ Object
22 23 24 |
# File 'lib/playbook/max_height.rb', line 22 def max_height_values MAX_HEIGHT_VALUES end |