pos. exchange. post. action. menu-item. renderTarget
Target
A static extension target that renders as a menu item on the post-exchange screen
Note
This is part of a POS UI Extensions developer preview. More information to come.
Was this section helpful?
Menu item
import React from 'react';
import {
Button,
reactExtension,
useApi,
} from '@shopify/ui-extensions-react/point-of-sale';
const ExchangeActionMenuItem = () => {
const api = useApi<'pos.exchange.post.action.menu-item.render'>();
return (
<Button
onPress={() => {
api.action.presentModal();
}}
/>
);
};
export default reactExtension(
'pos.exchange.post.action.menu-item.render',
() => <ExchangeActionMenuItem />,
);