Sha256: ac37332c5fdff932431ca818a9f83036d0cde98e820a06df2df12b7e5302e1a7
Contents?: true
Size: 697 Bytes
Versions: 117
Compression:
Stored size: 697 Bytes
Contents
# frozen_string_literal: true module Primer module Forms module Dsl # :nodoc: class ToggleSwitchInput < Input attr_reader :name, :label, :src, :csrf def initialize( name:, label:, src:, csrf: nil, **system_arguments ) @name = name @label = label @src = src @csrf = csrf super(**system_arguments) end def to_component ToggleSwitch.new(input: self) end def type :toggle_switch end def validation_arguments super.merge(role: "alert") end end end end end
Version data entries
117 entries across 117 versions & 2 rubygems