Add "loading" to Button in Admin Extension

In Checkout UI Extension, there’s a “loading” property which can be used to show loading state on the button (useful when customer clicks on a button, and something happens on the background).

But in Admin Extension, the button component does not have this “loading” property, I hope Shopify can add it to the Button component in Admin Extension.

1 Like

Good idea,

But in the meantime, you can also mock this behavior:

<Button disabled={state == "loading"}>
  {state === "loading" ? "Loading" : "Submit"} 
</Button>

But I agree, it would be nice to have a unified component API design across Checkout and Admin Extensions.