Sha256: ff53675101d548ba3d814bab73001917623bb435fea96a1a4f31da18fe2f1927

Contents?: true

Size: 663 Bytes

Versions: 2

Compression:

Stored size: 663 Bytes

Contents

# frozen_string_literal: true

module Yattho
  module Beta
    # @label Heading
    class HeadingPreview < ViewComponent::Preview
      # @label Playground
      #
      # @param tag [Symbol] select [h1, h2, h3, h4, h5, h6]
      # @param content [String] text
      def playground(tag: :h2, content: "Heading")
        render(Yattho::Beta::Heading.new(tag: tag)) { content }
      end

      # @label Default options
      #
      # @param tag [Symbol] select [h1, h2, h3, h4, h5, h6]
      # @param content [String] text
      def default(tag: :h2, content: "Heading")
        render(Yattho::Beta::Heading.new(tag: tag)) { content }
      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/heading_preview.rb
yattho_view_components-0.0.1 previews/yattho/beta/heading_preview.rb