Sha256: e279fdbdb740fc53734a4fd9755875acc3ce2915aba3d352c6bd6e01d7c2afed

Contents?: true

Size: 1.33 KB

Versions: 6

Compression:

Stored size: 1.33 KB

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # @label Flash
    class FlashPreview < ViewComponent::Preview
      # @label Playground
      #
      # @param full toggle
      # @param spacious toggle
      # @param dismissible toggle
      # @param icon [Symbol] select [alert, check, info, people]
      # @param scheme [Symbol] select [default, warning, danger, success]
      # @param content text
      def playground(full: false, spacious: false, dismissible: false, icon: :people, scheme: Primer::Beta::Flash::DEFAULT_SCHEME, content: "This is a flash message!")
        render(Primer::Beta::Flash.new(full: full, spacious: spacious, dismissible: dismissible, icon: icon, scheme: scheme)) { content }
      end

      # @label Default
      #
      # @param full toggle
      # @param spacious toggle
      # @param dismissible toggle
      # @param icon [Symbol] select [alert, check, info, people]
      # @param scheme [Symbol] select [default, warning, danger, success]
      # @param content text
      def default(full: false, spacious: false, dismissible: false, icon: :people, scheme: Primer::Beta::Flash::DEFAULT_SCHEME, content: "This is a flash message!")
        render(Primer::Beta::Flash.new(full: full, spacious: spacious, dismissible: dismissible, icon: icon, scheme: scheme)) { content }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
primer_view_components-0.0.110 previews/primer/beta/flash_preview.rb
primer_view_components-0.0.109 previews/primer/beta/flash_preview.rb
primer_view_components-0.0.108 previews/primer/beta/flash_preview.rb
primer_view_components-0.0.107 previews/primer/beta/flash_preview.rb
primer_view_components-0.0.106 previews/primer/beta/flash_preview.rb
primer_view_components-0.0.105 previews/primer/beta/flash_preview.rb