Sha256: 8c9031351d06c8c62ff731a166415a52e411add4120476c2bd17f875ab7f0b59

Contents?: true

Size: 756 Bytes

Versions: 7

Compression:

Stored size: 756 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # @label Counter
    class CounterPreview < ViewComponent::Preview
      # @label Default Options
      #
      # @param count number
      # @param limit number
      # @param hide_if_zero toggle
      # @param round toggle
      # @param scheme [Symbol] select [[Default, default], [Primary, primary], [Secondary, secondary]]]
      def default(count: 1_000, limit: nil, round: false, hide_if_zero: false, scheme: :default)
        render(Primer::Beta::Counter.new(count: count, round: round, limit: limit, hide_if_zero: hide_if_zero, scheme: scheme))
      end

      # @label With Text
      def with_text
        render(Primer::Beta::Counter.new(text: "∞"))
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
primer_view_components-0.0.104 previews/primer/beta/counter_preview.rb
primer_view_components-0.0.103 previews/primer/beta/counter_preview.rb
primer_view_components-0.0.102 previews/primer/beta/counter_preview.rb
primer_view_components-0.0.101 previews/primer/beta/counter_preview.rb
primer_view_components-0.0.100 previews/primer/beta/counter_preview.rb
primer_view_components-0.0.99 previews/primer/beta/counter_preview.rb
primer_view_components-0.0.98 previews/primer/beta/counter_preview.rb