Sha256: 9a5b9c8b90acdf511f8190e70605a32b15b91f9e1e959f12c97215e1693881c4
Contents?: true
Size: 470 Bytes
Versions: 129
Compression:
Stored size: 470 Bytes
Contents
# frozen_string_literal: true module Primer module Forms # :nodoc: class ToggleSwitch < BaseComponent delegate :builder, :form, to: :@input def initialize(input:) @input = input @input.add_label_classes("FormControl-label") @input.label_arguments[:id] = label_id @input.add_input_aria(:labelledby, label_id) end def label_id @label_id ||= "label-#{@input.base_id}" end end end end
Version data entries
129 entries across 129 versions & 2 rubygems