Sha256: 47e74df64bb548ebed0f5b7c38abba60666b2f4c6d5285a6cb30d2286e84a08f
Contents?: true
Size: 735 Bytes
Versions: 124
Compression:
Stored size: 735 Bytes
Contents
# frozen_string_literal: true module Playbook module PbImage class Image < Playbook::KitBase prop :alt prop :on_error, type: Playbook::Props::String, default: nil prop :rounded, type: Playbook::Props::Boolean, default: false prop :size, type: Playbook::Props::Enum, values: %w[xs sm md lg xl none], default: "none" prop :url def classname generate_classname("pb_image_kit#{size_class} lazyload blur_up") + rounded_class end private def rounded_class rounded ? " rounded" : "" end def size_class size == "none" ? nil : "_#{size}" end end end end
Version data entries
124 entries across 124 versions & 1 rubygems