Sha256: 4f6c35d426b5658f1e813c21dfdbab6e15962d192fd3eea344566b601e3c8bee
Contents?: true
Size: 1.26 KB
Versions: 6
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true module Primer module OpenProject # @component Primer::OpenProject::PageHeader # @label Page Header class PageHeaderPreview < ViewComponent::Preview # @label Default # @snapshot def default render(Primer::OpenProject::PageHeader.new) do |header| header.with_title { "Hello" } header.with_description { "Last updated 5 minutes ago by XYZ." } end end # @label Playground # @param variant [Symbol] select [medium, large] # @param title [String] text # @param description [String] text def playground(variant: :medium, title: "Hello", description: "Last updated 5 minutes ago by XYZ.") render(Primer::OpenProject::PageHeader.new) do |header| header.with_title(variant: variant) { title } header.with_description { description } end end # @label Large def large_title render(Primer::OpenProject::PageHeader.new) do |header| header.with_title(variant: :large) { "Hello" } header.with_description { "Last updated 5 minutes ago by XYZ." } end end # @label With actions def actions render_with_template(locals: {}) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems