Sha256: c452814a0175da86d9a87af86dbd28c8c75a23771c17c9588cd65fa5e3cd92e5
Contents?: true
Size: 676 Bytes
Versions: 9
Compression:
Stored size: 676 Bytes
Contents
# frozen_string_literal: true module Playbook module PbCheckbox class Checkbox include Playbook::Props partial "pb_checkbox/checkbox" prop :dark, type: Playbook::Props::Boolean, default: false prop :checked, type: Playbook::Props::Boolean, default: false prop :text prop :value prop :name def checked_html checked ? "checked='true'" : nil end def classname generate_classname("pb_checkbox_kit", dark_class, checked_class) end private def checked_class checked ? "on" : "off" end def dark_class dark ? "dark" : nil end end end end
Version data entries
9 entries across 9 versions & 1 rubygems