Admin Action
Use s-admin-action to configure a primary and secondary action and title. Use of this component is required in order to use Admin action extensions.
Anchor to propertiesProperties
- Anchor to headingheadingstring
The text to use as the Action modal’s title. If not provided, the name of the extension will be used.
- Anchor to loadingloadingbooleanDefault: false
Whether the action is in a loading state, such as initial page load or action opening. When true, the action could be in an inert state, which prevents user interaction.
Was this section helpful?
Anchor to slotsSlots
- Anchor to primary-actionprimary-actionHTMLElement
The primary action to display in the admin action.
- Anchor to secondary-actionssecondary-actionsHTMLElement
The secondary actions to display in the admin action.
Was this section helpful?
jsx
<s-admin-action title="My App Action">
Modal content
<s-button
slot="primary-action"
onClick={() => console.log('pressed primary action')}
>
Primary
</s-button>
<s-button
slot="secondary-actions"
onClick={() => console.log('pressed secondary action')}
>
Secondary
</s-button>
</s-admin-action>;
Examples
jsx
<s-admin-action title="My App Action"> Modal content <s-button slot="primary-action" onClick={() => console.log('pressed primary action')} > Primary </s-button> <s-button slot="secondary-actions" onClick={() => console.log('pressed secondary action')} > Secondary </s-button> </s-admin-action>;
Preview
