Add option for hiding close button in modal windows
This commit is contained in:
parent
8747ce4eb0
commit
ca238be6f4
@ -18,9 +18,11 @@
|
||||
<div class="m-1 bg-white rounded shadow">
|
||||
<div class="p-8">
|
||||
<%= content %>
|
||||
<% if @show_close_button %>
|
||||
<div class="flex justify-end items-center flex-wrap mt-6">
|
||||
<button class="btn-md btn-blue" data-action="click->modal#close:prevent">Close</button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,2 +1,5 @@
|
||||
class ModalComponent < ViewComponent::Base
|
||||
def initialize(show_close_button: true)
|
||||
@show_close_button = show_close_button
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user