Method: Polaris::BaseCheckbox#system_arguments

Defined in:
app/components/polaris/base_checkbox.rb

#system_argumentsObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'app/components/polaris/base_checkbox.rb', line 24

def system_arguments
  @system_arguments.tap do |opts|
    opts[:checked] = true if @checked
    opts[:disabled] = true if @disabled
    opts[:multiple] = true if @multiple
    opts[:aria] ||= {}
    opts[:aria][:checked] = @checked
    if indeterminate?
      @system_arguments[:indeterminate] = true
      @system_arguments[:aria][:checked] = "mixed"
    end
    opts[:class] = opts.delete(:classes)
    opts[:form] = @form if @form.present? && @attribute.blank?
  end
end