Welcome to mirror list, hosted at ThFree Co, Russian Federation.

spinner_component_preview.rb « pajamas « previews « components « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 149bfddcfc280074cc2ebf24911dc5ac4424e522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true
module Pajamas
  class SpinnerComponentPreview < ViewComponent::Preview
    # Spinner
    # ----
    # See its design reference [here](https://design.gitlab.com/components/spinner).
    #
    # @param inline toggle
    # @param label text
    # @param size select [[small, sm], [medium, md], [large, lg], [extra large, xl]]
    def default(inline: false, label: "Loading", size: :md)
      render(Pajamas::SpinnerComponent.new(inline: inline, label: label, size: size))
    end

    # Use a light spinner on dark backgrounds
    #
    # @display bg_color "#222"
    def light
      render(Pajamas::SpinnerComponent.new(color: :light))
    end
  end
end