Sha256: 156582917af46398e4f58446cdb0a293edb97bace142a776423bf8605e058120

Contents?: true

Size: 1023 Bytes

Versions: 2

Compression:

Stored size: 1023 Bytes

Contents

# frozen_string_literal: true

module Yattho
  module Beta
    # @label TimelineItem
    class TimelineItemPreview < ViewComponent::Preview
      # @label Playground
      #
      # @param condensed [Boolean]
      def playground(condensed: false)
        render(Yattho::Beta::TimelineItem.new(condensed: condensed)) do |component|
          component.with_avatar(src: Yattho::ExampleImage::BASE64_SRC, alt: "octocat")
          component.with_badge(bg: :success_emphasis, color: :on_emphasis, icon: :check)
          component.with_body { "Success!" }
        end
      end

      # @label Default
      #
      # @param condensed [Boolean]
      def default(condensed: false)
        render(Yattho::Beta::TimelineItem.new(condensed: condensed)) do |component|
          component.with_avatar(src: Yattho::ExampleImage::BASE64_SRC, alt: "octocat")
          component.with_badge(bg: :success_emphasis, color: :on_emphasis, icon: :check)
          component.with_body { "Success!" }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yattho_view_components-0.1.1 previews/yattho/beta/timeline_item_preview.rb
yattho_view_components-0.0.1 previews/yattho/beta/timeline_item_preview.rb