From f51705da30ccbb3f5e8b4160feb0938e726527fb Mon Sep 17 00:00:00 2001 From: Jaff Parker Date: Mon, 15 Oct 2018 12:35:03 -0400 Subject: [PATCH] [reactstrap] Fixed the error that was preventing from extending the Button component with custom props (#29595) * Fixed the error that was preventing from extending the Button component with custom props * Changed from All to more specific ButtonHTMLProps --- types/reactstrap/lib/Button.d.ts | 2 +- types/reactstrap/reactstrap-tests.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/reactstrap/lib/Button.d.ts b/types/reactstrap/lib/Button.d.ts index 326e5f88de..f19ecf4e32 100644 --- a/types/reactstrap/lib/Button.d.ts +++ b/types/reactstrap/lib/Button.d.ts @@ -1,7 +1,7 @@ import * as React from 'react'; import { CSSModule } from '../index'; -export type ButtonProps = React.HTMLProps & { +export type ButtonProps = React.ButtonHTMLAttributes & { outline?: boolean; active?: boolean; block?: boolean; diff --git a/types/reactstrap/reactstrap-tests.tsx b/types/reactstrap/reactstrap-tests.tsx index 48afb0ce31..ee8b39ae45 100644 --- a/types/reactstrap/reactstrap-tests.tsx +++ b/types/reactstrap/reactstrap-tests.tsx @@ -278,6 +278,11 @@ const Example13 = ( ); +interface CustomButtonProps extends ButtonProps { + customProp: string; +} +const CustomButton: React.SFC = props =>