Module: Playbook::BorderRadius
- Included in:
- KitBase
- Defined in:
- lib/playbook/border_radius.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/playbook/border_radius.rb', line 5 def self.included(base) base.prop :border_radius end |
Instance Method Details
#border_radius_options ⇒ Object
19 20 21 22 23 |
# File 'lib/playbook/border_radius.rb', line 19 def { border_radius: "border_radius", } end |
#border_radius_props ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/playbook/border_radius.rb', line 9 def border_radius_props selected_props = .keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| border_radius_value = send(k) "border_radius_#{border_radius_value}" if border_radius_values.include? border_radius_value end.compact.join(" ") end |
#border_radius_values ⇒ Object
25 26 27 |
# File 'lib/playbook/border_radius.rb', line 25 def border_radius_values %w[none xs sm md lg xl rounded] end |