@shopify/shop-minis-react
Version:
React component library for Shopify Shop Minis with Tailwind CSS v4 support (source-only, requires TypeScript)
17 lines (12 loc) • 411 B
text/typescript
import {ShopActions} from '@shopify/shop-minis-platform/actions'
import {useShopActions} from '../../internal/useShopActions'
interface UseErrorToastReturns {
/**
* Show an error toast with the given error message.
*/
showErrorToast: ShopActions['showErrorToast']
}
export const useErrorToast = (): UseErrorToastReturns => {
const {showErrorToast} = useShopActions()
return {showErrorToast}
}