Method: Primer::Beta::BorderBox#initialize
- Defined in:
- app/components/primer/beta/border_box.rb
permalink #initialize(padding: DEFAULT_PADDING, **system_arguments) ⇒ BorderBox
Returns a new instance of BorderBox.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'app/components/primer/beta/border_box.rb', line 75 def initialize(padding: DEFAULT_PADDING, **system_arguments) list_id = system_arguments.delete(:list_id) @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :div @system_arguments[:classes] = class_names( "Box", PADDING_MAPPINGS[fetch_or_fallback(PADDING_MAPPINGS.keys, padding, DEFAULT_PADDING)], system_arguments[:classes] ) @system_arguments[:system_arguments_denylist] = { [:p, :pt, :pb, :pr, :pl] => PADDING_SUGGESTION } @list_arguments = { tag: :ul } @list_arguments[:id] = list_id if list_id end |