Admin Action
AdminAction is a component used by Admin Action extensions to configure a primary and secondary action and title.
Anchor to adminactionpropsAdminActionProps
Anchor to title
title
string
Sets the title of the Action container. If not provided, the name of the extension will be used. Titles longer than 40 characters will be truncated.
Anchor to primaryAction
primaryAction
RemoteFragment
Sets the Primary action button of the container. This component must be a button component.
Anchor to secondaryAction
secondaryAction
RemoteFragment
Sets the Secondary action button of the container. This component must be a button component.
Anchor to loading
loading
boolean
Sets the loading state of the action modal
Was this section helpful?
Set the primary and secondary action of the Action modal.
import React from 'react';
import {reactExtension, AdminAction, Button} from '@shopify/ui-extensions-react/admin';
function App() {
return (
<AdminAction
title="My App Action"
primaryAction={<Button onPress={() => {}}>Action</Button>}
secondaryAction={<Button onPress={() => {}}>Secondary</Button>}
>
Modal content
</AdminAction>
);
}
export default reactExtension('Playground', () => <App />);
Preview
