Skip to content

Commit

Permalink
Update styling for close button
Browse files Browse the repository at this point in the history
I think we need a more general solution similar to ConfirmModalComponent's .modal-actions so that we can style all modals more consistently. But it's too late in the afternoon.
  • Loading branch information
dacook committed Jan 11, 2024
1 parent 2914ad5 commit a4bd2c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/admin/products_v3/_edit_image.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= render ModalComponent.new id: "#modal_edit_product_image_#{image.id}", instant: true do
= render ModalComponent.new id: "#modal_edit_product_image_#{image.id}", instant: true, close_button: false do
%h2= t(".title")

%p= image_tag image.variant(:product)
Expand All @@ -10,5 +10,6 @@
= f.hidden_field :viewable_id, value: product.id

%p
%input{ class: "secondary", type: 'button', value: t('.close'), "data-action": "click->modal#close" }
= f.label :attachment, t(".upload"), class: "button primary icon-upload-alt"
= f.file_field :attachment, style: "display: none", "data-action": "change->form#submit"
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ en:
success: Changes saved
edit_image:
title: Edit product photo
close: Back
upload: Upload photo
delete_product:
success: Successfully deleted the product
Expand Down

0 comments on commit a4bd2c5

Please sign in to comment.