From 492abddfc2e4fc5e02b1485ed4bf1dca3357a96e Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Mon, 12 Jun 2023 13:52:43 +0200 Subject: [PATCH] Fix Config type accepting as and onClick props --- src/AsyncButton.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/AsyncButton.tsx b/src/AsyncButton.tsx index 4968a26..02faf22 100644 --- a/src/AsyncButton.tsx +++ b/src/AsyncButton.tsx @@ -2,7 +2,10 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import PropTypes from 'prop-types'; import makeCancellable from 'make-cancellable-promise'; -type Config = React.ComponentPropsWithoutRef; +type Config = Omit< + React.ComponentPropsWithoutRef, + 'as' | 'onClick' +>; export type AsyncButtonProps = { as?: T; -- 2.54.0