From a5b88d226ec5dcddb4232510833af8ad96514c04 Mon Sep 17 00:00:00 2001 From: Colin Rudd Date: Fri, 27 Dec 2024 13:44:09 -0500 Subject: [PATCH] Remove `error` arg from errorMessageImpl components. --- cmp/error/ErrorMessage.ts | 2 -- desktop/cmp/error/impl/ErrorMessage.ts | 8 +++++--- mobile/cmp/error/impl/ErrorMessage.ts | 8 +++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cmp/error/ErrorMessage.ts b/cmp/error/ErrorMessage.ts index 770fdf79d..1cf7cf0c0 100644 --- a/cmp/error/ErrorMessage.ts +++ b/cmp/error/ErrorMessage.ts @@ -97,14 +97,12 @@ export const [ErrorMessage, errorMessage] = hoistCmp.withFactory({ - render({error, message, title, actionButtonProps, detailsButtonProps}) { +export const errorMessageImpl = hoistCmp.factory< + Omit +>({ + render({message, title, actionButtonProps, detailsButtonProps}) { let buttons = [], buttonBar = null; if (detailsButtonProps) buttons.push(detailsButton(detailsButtonProps as ButtonProps)); @@ -31,7 +33,7 @@ export const errorMessageImpl = hoistCmp.factory({ return div({ className: 'xh-error-message__inner', - items: [titleCmp({title}), messageCmp({message, error}), buttonBar] + items: [titleCmp({title}), messageCmp({message}), buttonBar] }); } }); diff --git a/mobile/cmp/error/impl/ErrorMessage.ts b/mobile/cmp/error/impl/ErrorMessage.ts index dca3ff48c..909db1838 100644 --- a/mobile/cmp/error/impl/ErrorMessage.ts +++ b/mobile/cmp/error/impl/ErrorMessage.ts @@ -17,8 +17,10 @@ import '@xh/hoist/mobile/register'; * Mobile implementation of ErrorMessage. * @internal */ -export const errorMessageImpl = hoistCmp.factory({ - render({error, message, title, actionButtonProps, detailsButtonProps}) { +export const errorMessageImpl = hoistCmp.factory< + Omit +>({ + render({message, title, actionButtonProps, detailsButtonProps}) { let buttons = [], buttonBar = null; if (detailsButtonProps) buttons.push(detailsButton(detailsButtonProps as ButtonProps)); @@ -31,7 +33,7 @@ export const errorMessageImpl = hoistCmp.factory({ return div({ className: 'xh-error-message__inner', - items: [titleCmp({title}), messageCmp({message, error}), buttonBar] + items: [titleCmp({title}), messageCmp({message}), buttonBar] }); } });