Sha256: 47cb4d6da030ef090f86de938b8577231ceac37dc47ad2f3eec89806bd73fcf8
Contents?: true
Size: 832 Bytes
Versions: 67
Compression:
Stored size: 832 Bytes
Contents
# frozen_string_literal: true module Playbook module PbBackground class Background < Playbook::KitBase prop :background_color, type: Playbook::Props::Enum, values: %w[gradient dark light white], default: "light" prop :image_url prop :tag, type: Playbook::Props::Enum, values: %w[h1 h2 h3 h4 h5 h6 p div span], default: "div" def classname generate_classname("pb_background_kit", image_classname, background_color_classname, separator: " ") end private def image_classname image_url.present? ? "lazyload blur_up" : "" end def background_color_classname !image_url.present? ? "pb_background_color_#{background_color}" : "" end end end end
Version data entries
67 entries across 67 versions & 1 rubygems