Sha256: 085bfdd92ad7a24de62bc4d807a11274ca09f1db3252bdd0fe646c647fa91f15
Contents?: true
Size: 744 Bytes
Versions: 175
Compression:
Stored size: 744 Bytes
Contents
# frozen_string_literal: true require "action_view" module Playbook module PbToggle class Toggle < Playbook::KitBase prop :input_options, type: Playbook::Props::HashProp, default: {} prop :checked, type: Playbook::Props::Boolean, default: false prop :name prop :size, type: Playbook::Props::Enum, values: %w[sm md], default: "sm" prop :value def classname generate_classname("pb_toggle_kit", size, checked_class) end def input check_box_tag(name, value, checked, input_options) end private def checked_class checked ? "on" : "off" end end end end
Version data entries
175 entries across 175 versions & 1 rubygems