Sha256: 3ac7714bd64a94bd401aca81b9e345366833ae11ed940fab959e4667d13ce4ba
Contents?: true
Size: 1.05 KB
Versions: 34
Compression:
Stored size: 1.05 KB
Contents
# frozen_string_literal: true require "action_view" module Playbook module PbRadio class Radio include ActionView::Helpers::FormTagHelper include ActionView::Context include Playbook::Props partial "pb_radio/radio" prop :checked, type: Playbook::Props::Boolean, default: false prop :error, type: Playbook::Props::Boolean, default: false 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 input check_box_tag(name, value, checked) 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
34 entries across 34 versions & 1 rubygems