All things Shopify and commerce
When using the shopify app bridge Modal component the close("x") button at the top doesn't work.
Here's the link to the doc.
import {Modal, TitleBar, useAppBridge} from '@shopify/app-bridge-react';
export function MyModal() {
const shopify = useAppBridge();
return (
<>
<button onClick={() => shopify.modal.show('my-modal')}>Open Modal</button>
<Modal id="my-modal">
<p>Message</p>
<TitleBar title="Title">
<button variant="primary">Label</button>
<button onClick={() => shopify.modal.hide('my-modal')}>Label</button>
</TitleBar>
</Modal>
</>
);
}
More over can you explain why the primary and secondary action button clicks submit the form?
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024