mirror of
https://github.com/we-promise/sure.git
synced 2026-06-05 10:49:01 +00:00
Fix select is hidden inside dialog (#1196)
* Fix Select hidden inside Dialog * Fix regression in Drawer
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<%= tag.dialog class: "w-full h-full bg-transparent theme-dark:backdrop:bg-alpha-black-900 backdrop:bg-overlay pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] #{(drawer? || responsive?) ? "lg:p-3" : "lg:p-1"}", **merged_opts do %>
|
||||
<%= tag.div class: dialog_outer_classes do %>
|
||||
<%= tag.div class: dialog_inner_classes, data: { DS__dialog_target: "content" } do %>
|
||||
<div class="grow overflow-y-auto py-4 space-y-4 flex flex-col">
|
||||
<div class="grow py-4 space-y-4 flex flex-col <%= 'overflow-auto' if scrollable %>">
|
||||
<% if header? %>
|
||||
<%= header %>
|
||||
<% end %>
|
||||
|
||||
@@ -33,7 +33,7 @@ class DS::Dialog < DesignSystemComponent
|
||||
end
|
||||
end
|
||||
|
||||
attr_reader :variant, :auto_open, :reload_on_close, :width, :disable_frame, :content_class, :disable_click_outside, :opts, :responsive
|
||||
attr_reader :variant, :auto_open, :reload_on_close, :width, :disable_frame, :content_class, :disable_click_outside, :opts, :responsive, :scrollable
|
||||
|
||||
VARIANTS = %w[modal drawer].freeze
|
||||
WIDTHS = {
|
||||
@@ -43,7 +43,7 @@ class DS::Dialog < DesignSystemComponent
|
||||
full: "lg:max-w-full"
|
||||
}.freeze
|
||||
|
||||
def initialize(variant: "modal", auto_open: true, reload_on_close: false, width: "md", frame: nil, disable_frame: false, content_class: nil, disable_click_outside: false, responsive: false, **opts)
|
||||
def initialize(variant: "modal", auto_open: true, reload_on_close: false, width: "md", frame: nil, disable_frame: false, content_class: nil, disable_click_outside: false, responsive: false, scrollable: true, **opts)
|
||||
@variant = variant.to_sym
|
||||
@auto_open = auto_open
|
||||
@reload_on_close = reload_on_close
|
||||
@@ -53,6 +53,7 @@ class DS::Dialog < DesignSystemComponent
|
||||
@content_class = content_class
|
||||
@disable_click_outside = disable_click_outside
|
||||
@responsive = responsive
|
||||
@scrollable = scrollable
|
||||
@opts = opts
|
||||
end
|
||||
|
||||
@@ -97,7 +98,7 @@ class DS::Dialog < DesignSystemComponent
|
||||
end
|
||||
|
||||
class_names(
|
||||
"flex flex-col bg-container rounded-xl shadow-border-xs mx-3 lg:mx-0 w-full overflow-hidden",
|
||||
"flex flex-col bg-container rounded-xl shadow-border-xs mx-3 lg:mx-0 w-full",
|
||||
variant_classes,
|
||||
content_class
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<%= render DS::Dialog.new(scrollable: false) do |dialog| %>
|
||||
<% dialog.with_header(title: "New transaction") %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", entry: @entry, categories: @categories %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<%= render DS::Dialog.new(scrollable: false) do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", transfer: @transfer %>
|
||||
|
||||
Reference in New Issue
Block a user