mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
[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
This commit is contained in:
committed by
Sheetal Nandi
parent
3e3b7cf82e
commit
f51705da30
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { CSSModule } from '../index';
|
||||
|
||||
export type ButtonProps<T = {}> = React.HTMLProps<HTMLButtonElement> & {
|
||||
export type ButtonProps<T = {}> = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
||||
outline?: boolean;
|
||||
active?: boolean;
|
||||
block?: boolean;
|
||||
|
||||
@@ -278,6 +278,11 @@ const Example13 = (
|
||||
</div>
|
||||
);
|
||||
|
||||
interface CustomButtonProps extends ButtonProps {
|
||||
customProp: string;
|
||||
}
|
||||
const CustomButton: React.SFC<CustomButtonProps> = props => <Button {...props} />;
|
||||
|
||||
class Example14 extends React.Component<any, any> {
|
||||
state: any;
|
||||
constructor(props: any) {
|
||||
@@ -3759,7 +3764,7 @@ import { default as Alert_ } from './lib/Alert'; /* tslint:disable-line: no-rela
|
||||
import { default as Badge_ } from './lib/Badge'; /* tslint:disable-line: no-relative-import-in-test */
|
||||
import { default as Breadcrumb_ } from './lib/Breadcrumb'; /* tslint:disable-line: no-relative-import-in-test */
|
||||
import { default as BreadcrumbItem_ } from './lib/BreadcrumbItem'; /* tslint:disable-line: no-relative-import-in-test */
|
||||
import { default as Button_ } from './lib/Button'; /* tslint:disable-line: no-relative-import-in-test */
|
||||
import { default as Button_, ButtonProps } from './lib/Button'; /* tslint:disable-line: no-relative-import-in-test */
|
||||
import { default as ButtonDropdown_ } from './lib/ButtonDropdown'; /* tslint:disable-line: no-relative-import-in-test */
|
||||
import { default as ButtonGroup_ } from './lib/ButtonGroup'; /* tslint:disable-line: no-relative-import-in-test */
|
||||
import { default as ButtonToolbar_ } from './lib/ButtonToolbar'; /* tslint:disable-line: no-relative-import-in-test */
|
||||
|
||||
Reference in New Issue
Block a user