Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add discount details block #1920

Draft
wants to merge 1 commit into
base: unstable
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ You register targets in your \`shopify.extension.toml\` and inside the Javascrip
sectionContent:
'This page shows information about a single draft order. The `admin.draft-order-details.block.render` target is available on this page.',
},
{
title: 'Discount details',
sectionContent:
'This page shows information about a single discount. The `admin.discount-details.block.render` target is available on this page.',
},
{
title: 'Order details',
sectionContent:
Expand Down
10 changes: 10 additions & 0 deletions packages/ui-extensions/src/surfaces/admin/extension-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ export interface ExtensionTargets {
AllComponents
>;

/**
* Renders an admin block in the discount details page.
*
* See the [list of available components](/docs/api/admin-extensions/components).
*/
'admin.discount-details.block.render': RenderExtension<
BlockExtensionApi<'admin.discount-details.block.render'>,
AllComponents
>;

/**
* Renders an admin block in the customer details page.
*
Expand Down