Class: Polaris::PageActionsComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/polaris/page_actions_component.rb

Constant Summary collapse

DISTRIBUTION_DEFAULT =
nil
DISTRIBUTION_OPTIONS =
[
  DISTRIBUTION_DEFAULT,
  :equal_spacing,
  :leading,
  :trailing,
  :center,
  :fill,
  :fill_evenly
]

Constants included from ViewHelper

ViewHelper::POLARIS_HELPERS, ViewHelper::POLARIS_TEXT_STYLES

Constants included from FetchOrFallbackHelper

FetchOrFallbackHelper::InvalidValueError

Instance Method Summary collapse

Methods included from ViewHelper

#polaris_body_styles, #polaris_icon_source, #polaris_inversed_colors

Methods included from OptionHelper

#append_option, #prepend_option

Methods included from FetchOrFallbackHelper

#fetch_or_fallback, #fetch_or_fallback_boolean

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(distribution: DISTRIBUTION_DEFAULT, **system_arguments) ⇒ PageActionsComponent

Returns a new instance of PageActionsComponent.



21
22
23
24
25
26
27
28
29
# File 'app/components/polaris/page_actions_component.rb', line 21

def initialize(distribution: DISTRIBUTION_DEFAULT, **system_arguments)
  @distribution = fetch_or_fallback(DISTRIBUTION_OPTIONS, distribution, DISTRIBUTION_DEFAULT)
  @system_arguments = system_arguments
  @system_arguments[:tag] = "div"
  @system_arguments[:classes] = class_names(
    @system_arguments[:classes],
    "Polaris-PageActions"
  )
end