16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/loco_motion/component_config.rb', line 16
def build
@component.component_parts.each do |part, defaults|
@parts[part] = {
default_css: [],
default_html: {},
default_tag_name: defaults[:tag_name] || :div,
default_stimulus_controllers: [],
user_css: @options["#{part}_css".to_sym] || [],
user_html: @options["#{part}_html".to_sym] || {},
user_tag_name: @options["#{part}_tag_name".to_sym],
user_stimulus_controllers: @options["#{part}_controllers".to_sym] || [],
}
end
merge_user_options!(**@options)
end
|