Sha256: 72e80a3d90418651409bbf08374d824ce10adaa4f27bd2a5d00d1569ed4decff
Contents?: true
Size: 976 Bytes
Versions: 76
Compression:
Stored size: 976 Bytes
Contents
# frozen_string_literal: true require "action_view" module Playbook module PbRadio class Radio < Playbook::KitBase prop :checked, type: Playbook::Props::Boolean, default: false prop :error, type: Playbook::Props::Boolean, default: false prop :input_options, type: Playbook::Props::Hash, default: {} prop :name, type: Playbook::Props::String, default: "radio_name" prop :text, type: Playbook::Props::String, default: "Radio Text" prop :value, type: Playbook::Props::String, default: "radio_text" def classname generate_classname("pb_radio_kit") + error_class end def selected "checked" if checked == true end def body_status error ? "negative" : nil end private def error_class error ? " error" : "" end end end end
Version data entries
76 entries across 76 versions & 1 rubygems