class Primer::Beta::Spinner
Use ‘Spinner` to let users know that content is being loaded.
def initialize(size: DEFAULT_SIZE, style: DEFAULT_STYLE, **system_arguments)
-
system_arguments
(Hash
) -- <%= link_to_system_arguments_docs %> -
style
(String
) -- Custom element styles. -
size
(Symbol
) -- <%= one_of(Primer::Beta::Spinner::SIZE_MAPPINGS) %>
def initialize(size: DEFAULT_SIZE, style: DEFAULT_STYLE, **system_arguments) @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :svg @system_arguments[:style] ||= style @system_arguments[:animation] = :rotate @system_arguments[:width] = SIZE_MAPPINGS[fetch_or_fallback(SIZE_OPTIONS, size, DEFAULT_SIZE)] @system_arguments[:height] = SIZE_MAPPINGS[fetch_or_fallback(SIZE_OPTIONS, size, DEFAULT_SIZE)] @system_arguments[:viewBox] = "0 0 16 16" @system_arguments[:fill] = :none end