Skip to main content

Action API
APIs

() => void
required

Presents the action-overlay.render extension target on top of present view.

For example: if we are calling presentModal() from pos.purchase.post.action.menu-item.render, it should present pos.purchase.post.action.render.

Was this section helpful?

Examples of using the Action API.

Was this section helpful?

Present a modal from post purchase.

import React from 'react';
import {
reactExtension,
useApi,
ActionItem,
} from '@shopify/ui-extensions-react/point-of-sale';

const PostPurchaseActionItem = () => {
const api = useApi<'pos.purchase.post.action.menu-item.render'>();

return (
<ActionItem
onPress={() => api.action.presentModal()}
enabled
/>
);
};

export default reactExtension(
'pos.purchase.post.action.menu-item.render',
() => <PostPurchaseActionItem />
);