Class: BetterUi::Dialog::DialogComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- BetterUi::Dialog::DialogComponent
- Defined in:
- app/components/better_ui/dialog/dialog_component.rb
Constant Summary collapse
- SIZES =
{ sm: "sm:max-w-sm", md: "sm:max-w-md", lg: "sm:max-w-lg", xl: "sm:max-w-xl", xxl: "sm:max-w-2xl", full: "sm:max-w-full sm:mx-4" }.freeze
Constants inherited from ApplicationComponent
ApplicationComponent::SHADOWS, ApplicationComponent::VARIANTS, ApplicationComponent::VARIANT_BODY_DIVIDE, ApplicationComponent::VARIANT_DIVIDE, ApplicationComponent::VARIANT_HEADER_BG, ApplicationComponent::VARIANT_HEADER_TEXT, ApplicationComponent::VARIANT_HIGHLIGHTED, ApplicationComponent::VARIANT_HOVERABLE, ApplicationComponent::VARIANT_RING, ApplicationComponent::VARIANT_SORT_ICON, ApplicationComponent::VARIANT_STRIPED
Instance Method Summary collapse
-
#initialize(size: :md, close_on_backdrop: true, close_on_escape: true, open: false, show_close_button: true, container_classes: nil, **options) ⇒ DialogComponent
constructor
A new instance of DialogComponent.
Constructor Details
#initialize(size: :md, close_on_backdrop: true, close_on_escape: true, open: false, show_close_button: true, container_classes: nil, **options) ⇒ DialogComponent
Returns a new instance of DialogComponent.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/components/better_ui/dialog/dialog_component.rb', line 17 def initialize( size: :md, close_on_backdrop: true, close_on_escape: true, open: false, show_close_button: true, container_classes: nil, ** ) @size = validate_size(size) @close_on_backdrop = close_on_backdrop @close_on_escape = close_on_escape @open = open @show_close_button = @container_classes = container_classes @options = end |