[reactstrap] 'toggle()' and 'tag' prop updates (#38575)

* [reactstrap] Update toggle() functions to use EventListeners instead of void functions

* [reactstrap] update all tag props to also allow strings

* [reactstrap] minor updates based on PR suggestions

* [reactstrap] fix formatting from husky; address issues from PR
This commit is contained in:
Bill Parrott
2019-10-09 12:07:16 -07:00
committed by Armando Aguirre
parent 81b79d2950
commit 595e29da14
70 changed files with 520 additions and 522 deletions
+1
View File
@@ -10,6 +10,7 @@
// Georg Steinmetz <https://github.com/georg94>
// Kyle Tsang <https://github.com/kyletsang>
// Hayato Shimokawa <https://github.com/ichiwa>
// Bill Parrott <https://github.com/chimericdream>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
+8 -8
View File
@@ -3,16 +3,16 @@ import { CSSModule } from '../index';
import { FadeProps } from './Fade';
export interface UncontrolledAlertProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
className?: string;
cssModule?: CSSModule;
color?: string;
tag?: React.ReactType;
transition?: FadeProps;
[key: string]: any;
className?: string;
cssModule?: CSSModule;
color?: string;
tag?: string | React.ReactType;
transition?: FadeProps;
}
export interface AlertProps extends UncontrolledAlertProps {
isOpen?: boolean;
toggle?: () => void;
isOpen?: boolean;
toggle?: React.MouseEventHandler<any>;
}
declare class Alert<T = {[key: string]: any}> extends React.Component<AlertProps> {}
+6 -6
View File
@@ -2,12 +2,12 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface BadgeProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
color?: string;
pill?: boolean;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
color?: string;
pill?: boolean;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class Badge<T = {[key: string]: any}> extends React.Component<BadgeProps> {}
+7 -7
View File
@@ -2,13 +2,13 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface BreadcrumbItemProps extends React.HTMLAttributes<HTMLElement> {
tag?: React.ReactType;
active?: boolean;
className?: string;
cssModule?: CSSModule;
// if a is passed as a string
// this could be href
[others: string]: any;
tag?: string | React.ReactType;
active?: boolean;
className?: string;
cssModule?: CSSModule;
// if a is passed as a string
// this could be href
[others: string]: any;
}
declare class BreadcrumbItem<T = {[key: string]: any}> extends React.Component<BreadcrumbItemProps> {}
+13 -15
View File
@@ -2,21 +2,19 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
[key: string]: any;
outline?: boolean;
active?: boolean;
block?: boolean;
color?: string;
disabled?: boolean;
tag?: React.ReactType;
innerRef?: React.Ref<HTMLButtonElement>;
onClick?: React.MouseEventHandler<any>;
size?: any;
id?: string;
style?: React.CSSProperties;
cssModule?: CSSModule;
[key: string]: any;
outline?: boolean;
active?: boolean;
block?: boolean;
color?: string;
disabled?: boolean;
tag?: string | React.ReactType;
innerRef?: React.Ref<HTMLButtonElement>;
onClick?: React.MouseEventHandler<any>;
size?: any;
id?: string;
style?: React.CSSProperties;
cssModule?: CSSModule;
}
declare class Button<T = {[key: string]: any}> extends React.Component<ButtonProps> {}
+8 -8
View File
@@ -2,14 +2,14 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ButtonGroupProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
'aria-label'?: string;
className?: string;
cssModule?: CSSModule;
role?: string;
size?: string;
vertical?: boolean;
[key: string]: any;
tag?: string | React.ReactType;
'aria-label'?: string;
className?: string;
cssModule?: CSSModule;
role?: string;
size?: string;
vertical?: boolean;
}
declare class ButtonGroup<T = {[key: string]: any}> extends React.Component<ButtonGroupProps> {}
+6 -6
View File
@@ -2,12 +2,12 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ButtonToolbarProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
'aria-label'?: string;
className?: string;
cssModule?: CSSModule;
role?: string;
[key: string]: any;
tag?: string | React.ReactType;
'aria-label'?: string;
className?: string;
cssModule?: CSSModule;
role?: string;
}
declare class ButtonToolbar<T = {[key: string]: any}> extends React.Component<ButtonToolbarProps> {}
+9 -9
View File
@@ -2,15 +2,15 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
inverse?: boolean;
color?: string;
body?: boolean;
outline?: boolean;
className?: string;
cssModule?: CSSModule;
style?: React.CSSProperties;
[key: string]: any;
tag?: string | React.ReactType;
inverse?: boolean;
color?: string;
body?: boolean;
outline?: boolean;
className?: string;
cssModule?: CSSModule;
style?: React.CSSProperties;
}
declare class Card<T = {[key: string]: any}> extends React.Component<CardProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardBodyProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardBody<T = {[key: string]: any}> extends React.Component<CardBodyProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardColumnsProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardColumns<T = {[key: string]: any}> extends React.Component<CardColumnsProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardDeckProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardDeck<T = {[key: string]: any}> extends React.Component<CardDeckProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardFooterProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardFooter<T = {[key: string]: any}> extends React.Component<CardFooterProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardGroupProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardGroup<T = {[key: string]: any}> extends React.Component<CardGroupProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardHeaderProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardHeader<T = {[key: string]: any}> extends React.Component<CardHeaderProps> {}
+10 -10
View File
@@ -2,16 +2,16 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardImgProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
top?: boolean;
bottom?: boolean;
className?: string;
cssModule?: CSSModule;
src?: string;
width?: string;
height?: string;
alt?: string;
[key: string]: any;
tag?: string | React.ReactType;
top?: boolean;
bottom?: boolean;
className?: string;
cssModule?: CSSModule;
src?: string;
width?: string;
height?: string;
alt?: string;
}
declare class CardImg<T = {[key: string]: any}> extends React.Component<CardImgProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardImgOverlayProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardImgOverlay<T = {[key: string]: any}> extends React.Component<CardImgOverlayProps> {}
+6 -6
View File
@@ -2,12 +2,12 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardLinkProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
innerRef?: React.Ref<HTMLAnchorElement>;
className?: string;
cssModule?: CSSModule;
href?: string;
[key: string]: any;
tag?: string | React.ReactType;
innerRef?: React.Ref<HTMLAnchorElement>;
className?: string;
cssModule?: CSSModule;
href?: string;
}
declare class CardLink<T = {[key: string]: any}> extends React.Component<CardLinkProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardSubtitleProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardSubtitle<T = {[key: string]: any}> extends React.Component<CardSubtitleProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardTextProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardText<T = {[key: string]: any}> extends React.Component<CardTextProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CardTitleProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class CardTitle<T = {[key: string]: any}> extends React.Component<CardTitleProps> {}
+11 -11
View File
@@ -2,17 +2,17 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CarouselItemProps extends React.HTMLProps<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
in?: boolean;
cssModule?: CSSModule;
slide?: boolean;
onEnter?: () => void;
onEntering?: () => void;
onEntered?: () => void;
onExit?: () => void;
onExiting?: () => void;
onExited?: () => void;
[key: string]: any;
tag?: string | React.ReactType;
in?: boolean;
cssModule?: CSSModule;
slide?: boolean;
onEnter?: () => void;
onEntering?: () => void;
onEntered?: () => void;
onExit?: () => void;
onExiting?: () => void;
onExited?: () => void;
}
declare class CarouselItem<T = {[key: string]: any}> extends React.Component<CarouselItemProps> {}
+9 -9
View File
@@ -13,16 +13,16 @@ export type ColumnProps
};
export interface ColProps extends React.HTMLProps<HTMLDivElement> {
[key: string]: any;
tag?: React.ReactType;
xs?: ColumnProps;
sm?: ColumnProps;
md?: ColumnProps;
lg?: ColumnProps;
xl?: ColumnProps;
[key: string]: any;
tag?: string | React.ReactType;
xs?: ColumnProps;
sm?: ColumnProps;
md?: ColumnProps;
lg?: ColumnProps;
xl?: ColumnProps;
// custom widths
widths?: string[];
// custom widths
widths?: string[];
}
declare class Col<T = {[key: string]: any}> extends React.Component<ColProps> {}
+21 -25
View File
@@ -2,33 +2,29 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface CollapseProps extends React.HTMLProps<HTMLElement> {
[key: string]: any;
isOpen?: boolean;
classNames?: string;
cssModule?: CSSModule;
tag?: React.ReactType;
navbar?: boolean;
delay?: {
show: number
hide: number
};
onOpened?: () => void;
onClosed?: () => void;
onEntering?: () => void;
onEntered?: () => void;
onExit?: () => void;
onExiting?: () => void;
onExited?: () => void;
[key: string]: any;
isOpen?: boolean;
classNames?: string;
cssModule?: CSSModule;
tag?: string | React.ReactType;
navbar?: boolean;
delay?: {
show: number;
hide: number;
};
onOpened?: () => void;
onClosed?: () => void;
onEntering?: () => void;
onEntered?: () => void;
onExit?: () => void;
onExiting?: () => void;
onExited?: () => void;
}
export interface UncontrolledCollapseProps extends React.HTMLProps<HTMLElement> {
[key: string]: any;
isOpen?: boolean;
className?: string;
cssModule?: CSSModule;
tag?: React.ReactType;
navbar?: boolean;
toggle?: () => void;
export interface UncontrolledCollapseProps extends CollapseProps {
defaultOpen?: boolean;
toggler: string;
toggleEvents?: string[];
}
declare class Collapse<T = {[key: string]: any}> extends React.Component<CollapseProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ContainerProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
fluid?: boolean;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
fluid?: boolean;
className?: string;
cssModule?: CSSModule;
}
declare class Container<T = {[key: string]: any}> extends React.Component<ContainerProps> {}
+14 -10
View File
@@ -7,25 +7,29 @@ export type Direction =
| "left"
| "right";
export interface UncontrolledDropdownProps extends React.HTMLAttributes<HTMLElement> {
export interface DropdownProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
disabled?: boolean;
direction?: Direction;
group?: boolean;
isOpen?: boolean;
toggle?: () => void;
nav?: boolean;
active?: boolean;
addonType?: boolean | 'prepend' | 'append';
size?: string;
tag?: string | React.ReactType;
toggle?: React.KeyboardEventHandler<any> | React.MouseEventHandler<any>;
children?: React.ReactNode;
className?: string;
cssModule?: CSSModule;
nav?: boolean;
inNavbar?: boolean;
setActiveFromChild?: boolean;
}
export interface DropdownProps extends UncontrolledDropdownProps {
disabled?: boolean;
direction?: Direction;
group?: boolean;
size?: string;
tag?: React.ReactType;
addonType?: boolean | 'prepend' | 'append';
export interface UncontrolledDropdownProps extends DropdownProps {
defaultOpen?: boolean;
}
declare class Dropdown<T = {[key: string]: any}> extends React.Component<DropdownProps> {}
export default Dropdown;
+11 -11
View File
@@ -2,17 +2,17 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface DropdownItemProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
disabled?: boolean;
divider?: boolean;
tag?: React.ReactType;
header?: boolean;
onClick?: (event: React.MouseEvent<any>) => void;
className?: string;
cssModule?: CSSModule;
href?: string;
toggle?: boolean;
active?: boolean;
[key: string]: any;
disabled?: boolean;
divider?: boolean;
tag?: string | React.ReactType;
header?: boolean;
onClick?: React.MouseEventHandler<any>;
className?: string;
cssModule?: CSSModule;
href?: string;
toggle?: boolean;
active?: boolean;
}
declare class DropdownItem<T> extends React.Component<DropdownItemProps> {}
+9 -9
View File
@@ -3,15 +3,15 @@ import * as Popper from 'popper.js';
import { CSSModule } from '../index';
export interface DropdownMenuProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
right?: boolean;
className?: string;
cssModule?: CSSModule;
flip?: boolean;
modifiers?: Popper.Modifiers;
persist?: boolean;
positionFixed?: boolean;
[key: string]: any;
tag?: string | React.ReactType;
right?: boolean;
className?: string;
cssModule?: CSSModule;
flip?: boolean;
modifiers?: Popper.Modifiers;
persist?: boolean;
positionFixed?: boolean;
}
declare class DropdownMenu<T = {[key: string]: any}> extends React.Component<DropdownMenuProps> {}
+14 -14
View File
@@ -2,20 +2,20 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface DropdownToggleProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
caret?: boolean;
className?: string;
cssModule?: CSSModule;
disabled?: boolean;
onClick?: React.MouseEventHandler<any>;
outline?: boolean;
'data-toggle'?: string;
'aria-haspopup'?: boolean;
split?: boolean;
tag?: React.ReactType;
nav?: boolean;
color?: string;
size?: string;
[key: string]: any;
caret?: boolean;
className?: string;
cssModule?: CSSModule;
disabled?: boolean;
onClick?: React.MouseEventHandler<any>;
outline?: boolean;
'data-toggle'?: string;
'aria-haspopup'?: boolean;
split?: boolean;
tag?: string | React.ReactType;
nav?: boolean;
color?: string;
size?: string;
}
declare class DropdownToggle<T> extends React.Component<DropdownToggleProps> {}
+15 -15
View File
@@ -2,21 +2,21 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface FadeProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
in?: boolean;
baseClass?: string;
baseClassIn?: string;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
transitionAppearTimeout?: number;
transitionEnterTimeout?: number;
transitionLeaveTimeout?: number;
transitionAppear?: boolean;
transitionEnter?: boolean;
transitionLeave?: boolean;
onLeave?: () => void;
onEnter?: () => void;
[key: string]: any;
in?: boolean;
baseClass?: string;
baseClassIn?: string;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
transitionAppearTimeout?: number;
transitionEnterTimeout?: number;
transitionLeaveTimeout?: number;
transitionAppear?: boolean;
transitionEnter?: boolean;
transitionLeave?: boolean;
onLeave?: () => void;
onEnter?: () => void;
}
declare class Fade<T = {[key: string]: any}> extends React.Component<FadeProps> {}
+6 -6
View File
@@ -2,12 +2,12 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface FormProps extends React.HTMLProps<HTMLFormElement> {
[key: string]: any;
inline?: boolean;
tag?: React.ReactType;
innerRef?: React.Ref<HTMLFormElement>;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
inline?: boolean;
tag?: string | React.ReactType;
innerRef?: React.Ref<HTMLFormElement>;
className?: string;
cssModule?: CSSModule;
}
declare class Form<T> extends React.Component<FormProps> {}
+8 -8
View File
@@ -2,14 +2,14 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface FormGroupProps extends React.HTMLProps<HTMLDivElement> {
[key: string]: any;
row?: boolean;
check?: boolean;
inline?: boolean;
disabled?: boolean;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
row?: boolean;
check?: boolean;
inline?: boolean;
disabled?: boolean;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class FormGroup<T = {[key: string]: any}> extends React.Component<FormGroupProps> {}
+6 -6
View File
@@ -2,12 +2,12 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface FormTextProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
inline?: boolean;
tag?: React.ReactType;
color?: string;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
inline?: boolean;
tag?: string | React.ReactType;
color?: string;
className?: string;
cssModule?: CSSModule;
}
declare class FormText<T = {[key: string]: any}> extends React.Component<FormTextProps> {}
+12 -12
View File
@@ -29,18 +29,18 @@ export type InputType =
| 'color';
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
[key: string]: any;
type?: InputType;
bsSize?: 'lg' | 'sm';
state?: string;
valid?: boolean;
invalid?: boolean;
tag?: React.ReactType;
innerRef?: React.Ref<HTMLInputElement>;
plaintext?: boolean;
addon?: boolean;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
type?: InputType;
bsSize?: 'lg' | 'sm';
state?: string;
valid?: boolean;
invalid?: boolean;
tag?: string | React.ReactType;
innerRef?: React.Ref<HTMLInputElement>;
plaintext?: boolean;
addon?: boolean;
className?: string;
cssModule?: CSSModule;
}
declare class Input<T> extends React.Component<InputProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface InputGroupProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
size?: string;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
size?: string;
className?: string;
cssModule?: CSSModule;
}
declare class InputGroup<T = {[key: string]: any}> extends React.Component<InputGroupProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface InputGroupAddonProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
addonType: 'prepend' | 'append';
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
addonType: 'prepend' | 'append';
}
declare class InputGroupAddon<T = {[key: string]: any}> extends React.Component<InputGroupAddonProps> {}
+4 -4
View File
@@ -1,10 +1,10 @@
import * as React from 'react';
import { CSSModule } from '../index';
export interface InputGroupTextProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
cssModule?: CSSModule;
export interface InputGroupTextProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: string | React.ReactType;
cssModule?: CSSModule;
}
declare class InputGroupText<T = {[key: string]: any}> extends React.Component<InputGroupTextProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface JumbotronProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
fluid?: boolean;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
fluid?: boolean;
className?: string;
cssModule?: CSSModule;
}
declare class Jumbotron<T = {[key: string]: any}> extends React.Component<JumbotronProps> {}
+1 -1
View File
@@ -10,7 +10,7 @@ export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement>
disabled?: boolean;
size?: string;
for?: string;
tag?: string;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
xs?: ColumnProps;
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ListGroupProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
flush?: boolean;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
flush?: boolean;
className?: string;
cssModule?: CSSModule;
}
declare class ListGroup<T = {[key: string]: any}> extends React.Component<ListGroupProps> {}
+10 -11
View File
@@ -2,17 +2,16 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ListGroupItemProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
active?: boolean;
disabled?: boolean;
color?: string;
action?: boolean;
className?: string;
cssModule?: CSSModule;
href?: string;
onClick?: React.MouseEventHandler<any>;
[key: string]: any;
tag?: string | React.ReactType;
active?: boolean;
disabled?: boolean;
color?: string;
action?: boolean;
className?: string;
cssModule?: CSSModule;
href?: string;
onClick?: React.MouseEventHandler<any>;
}
declare class ListGroupItem<T = {[key: string]: any}> extends React.Component<ListGroupItemProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ListGroupItemHeadingProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class ListGroupItemHeading<T = {[key: string]: any}> extends React.Component<ListGroupItemHeadingProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ListGroupItemTextProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class ListGroupItemText<T = {[key: string]: any}> extends React.Component<ListGroupItemTextProps> {}
+16 -16
View File
@@ -2,22 +2,22 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface MediaProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
body?: boolean;
bottom?: boolean;
className?: string;
cssModule?: CSSModule;
heading?: boolean;
left?: boolean;
list?: boolean;
middle?: boolean;
object?: boolean;
right?: boolean;
tag?: React.ReactType;
top?: boolean;
src?: string;
href?: string;
alt?: string;
[key: string]: any;
body?: boolean;
bottom?: boolean;
className?: string;
cssModule?: CSSModule;
heading?: boolean;
left?: boolean;
list?: boolean;
middle?: boolean;
object?: boolean;
right?: boolean;
tag?: string | React.ReactType;
top?: boolean;
src?: string;
href?: string;
alt?: string;
}
declare class Media<T = {[key: string]: any}> extends React.Component<MediaProps> {}
+28 -28
View File
@@ -3,34 +3,34 @@ import { CSSModule } from '../index';
import { FadeProps } from './Fade';
export interface ModalProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
isOpen?: boolean;
autoFocus?: boolean;
size?: string;
toggle?: () => void;
keyboard?: boolean;
backdrop?: boolean | 'static';
scrollable?: boolean;
onEnter?: () => void;
onExit?: () => void;
onOpened?: () => void;
onClosed?: () => void;
className?: string;
cssModule?: CSSModule;
wrapClassName?: string;
modalClassName?: string;
backdropClassName?: string;
contentClassName?: string;
zIndex?: number | string;
fade?: boolean;
backdropTransition?: FadeProps;
modalTransition?: FadeProps;
centered?: boolean;
external?: React.ReactNode;
labelledBy?: string;
role?: string;
unmountOnClose?: boolean;
returnFocusAfterClose?: boolean;
[key: string]: any;
isOpen?: boolean;
autoFocus?: boolean;
size?: string;
toggle?: React.KeyboardEventHandler<any> | React.MouseEventHandler<any>;
keyboard?: boolean;
backdrop?: boolean | 'static';
scrollable?: boolean;
onEnter?: () => void;
onExit?: () => void;
onOpened?: () => void;
onClosed?: () => void;
className?: string;
cssModule?: CSSModule;
wrapClassName?: string;
modalClassName?: string;
backdropClassName?: string;
contentClassName?: string;
zIndex?: number | string;
fade?: boolean;
backdropTransition?: FadeProps;
modalTransition?: FadeProps;
centered?: boolean;
external?: React.ReactNode;
labelledBy?: string;
role?: string;
unmountOnClose?: boolean;
returnFocusAfterClose?: boolean;
}
declare class Modal<T> extends React.Component<ModalProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ModalBodyProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class ModalBody<T = {[key: string]: any}> extends React.Component<ModalBodyProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ModalFooterProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class ModalFooter<T = {[key: string]: any}> extends React.Component<ModalFooterProps> {}
+6 -6
View File
@@ -2,12 +2,12 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ModalHeaderProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
wrapTag?: React.ReactType;
toggle?: () => void;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
wrapTag?: string | React.ReactType;
toggle?: React.MouseEventHandler<any>;
}
declare class ModalHeader<T = {[key: string]: any}> extends React.Component<ModalHeaderProps> {}
+12 -12
View File
@@ -2,18 +2,18 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface NavProps extends React.HTMLProps<HTMLUListElement> {
[key: string]: any;
tabs?: boolean;
pills?: boolean;
vertical?: boolean | string;
horizontal?: string;
justified?: boolean;
fill?: boolean;
navbar?: boolean;
card?: boolean;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tabs?: boolean;
pills?: boolean;
vertical?: boolean | string;
horizontal?: string;
justified?: boolean;
fill?: boolean;
navbar?: boolean;
card?: boolean;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class Nav<T = {[key: string]: any}> extends React.Component<NavProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface NavItemProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
active?: boolean;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
active?: boolean;
className?: string;
cssModule?: CSSModule;
}
declare class NavItem<T = {[key: string]: any}> extends React.Component<NavItemProps> {}
+9 -9
View File
@@ -2,15 +2,15 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface NavLinkProps extends React.HTMLProps<HTMLAnchorElement> {
[key: string]: any;
tag?: React.ReactType;
innerRef?: React.Ref<HTMLAnchorElement>;
disabled?: boolean;
active?: boolean;
className?: string;
cssModule?: CSSModule;
onClick?: React.MouseEventHandler<any>;
href?: string;
[key: string]: any;
tag?: string | React.ReactType;
innerRef?: React.Ref<HTMLAnchorElement>;
disabled?: boolean;
active?: boolean;
className?: string;
cssModule?: CSSModule;
onClick?: React.MouseEventHandler<any>;
href?: string;
}
declare class NavLink<T> extends React.Component<NavLinkProps> {}
+12 -12
View File
@@ -2,18 +2,18 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface NavbarProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
light?: boolean;
dark?: boolean;
full?: boolean;
fixed?: string;
sticky?: string;
color?: string;
role?: string;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
expand?: boolean | string;
[key: string]: any;
light?: boolean;
dark?: boolean;
full?: boolean;
fixed?: string;
sticky?: string;
color?: string;
role?: string;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
expand?: boolean | string;
}
declare class Navbar<T = {[key: string]: any}> extends React.Component<NavbarProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface NavbarBrandProps extends React.HTMLProps<HTMLAnchorElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class NavbarBrand<T = {[key: string]: any}> extends React.Component<NavbarBrandProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface NavbarTogglerProps extends React.HTMLProps<HTMLAnchorElement> {
[key: string]: any;
tag?: React.ReactType;
type?: string;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
type?: string;
className?: string;
cssModule?: CSSModule;
}
declare class NavbarToggler<T = {[key: string]: any}> extends React.Component<NavbarTogglerProps> {}
+8 -8
View File
@@ -2,14 +2,14 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
className?: string;
listClassName?: string;
cssModule?: CSSModule;
size?: string;
tag?: React.ReactType;
listTag?: React.ReactType;
'aria-label'?: string;
[key: string]: any;
className?: string;
listClassName?: string;
cssModule?: CSSModule;
size?: string;
tag?: string | React.ReactType;
listTag?: React.ReactType;
'aria-label'?: string;
}
declare class Pagination<T = {[key: string]: any}> extends React.Component<PaginationProps> {}
+6 -6
View File
@@ -2,12 +2,12 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface PaginationItemProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
className?: string;
cssModule?: CSSModule;
active?: boolean;
disabled?: boolean;
tag?: React.ReactType;
[key: string]: any;
className?: string;
cssModule?: CSSModule;
active?: boolean;
disabled?: boolean;
tag?: string | React.ReactType;
}
declare class PaginationItem<T = {[key: string]: any}> extends React.Component<PaginationItemProps> {}
+9 -9
View File
@@ -2,15 +2,15 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface PaginationLinkProps extends React.HTMLProps<HTMLAnchorElement> {
[key: string]: any;
'aria-label'?: string;
className?: string;
cssModule?: CSSModule;
next?: boolean;
previous?: boolean;
first?: boolean;
last?: boolean;
tag?: React.ReactType;
[key: string]: any;
'aria-label'?: string;
className?: string;
cssModule?: CSSModule;
next?: boolean;
previous?: boolean;
first?: boolean;
last?: boolean;
tag?: string | React.ReactType;
}
declare class PaginationLink<T = {[key: string]: any}> extends React.Component<PaginationLinkProps> {}
+17 -17
View File
@@ -3,23 +3,23 @@ import * as Popper from 'popper.js';
import { CSSModule } from '../index';
export interface PopoverProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
isOpen?: boolean;
toggle?: () => void;
target: string | HTMLElement;
container?: string | HTMLElement;
boundariesElement?: Popper.Boundary | Element;
className?: string;
placement?: Popper.Placement;
innerClassName?: string;
disabled?: boolean;
hideArrow?: boolean;
placementPrefix?: string;
delay?: number | {show: number, hide: number};
modifiers?: Popper.Modifiers;
cssModule?: CSSModule;
fade?: boolean;
flip?: boolean;
[key: string]: any;
isOpen?: boolean;
toggle?: React.MouseEventHandler<any> | (() => void);
target: string | HTMLElement;
container?: string | HTMLElement;
boundariesElement?: Popper.Boundary | Element;
className?: string;
placement?: Popper.Placement;
innerClassName?: string;
disabled?: boolean;
hideArrow?: boolean;
placementPrefix?: string;
delay?: number | { show: number; hide: number };
modifiers?: Popper.Modifiers;
cssModule?: CSSModule;
fade?: boolean;
flip?: boolean;
}
export interface UncontrolledPopoverProps extends PopoverProps {
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface PopoverBodyProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class PopoverBody<T = {[key: string]: any}> extends React.Component<PopoverBodyProps> {}
+4 -4
View File
@@ -2,10 +2,10 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface PopoverHeaderProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class PopoverHeader<T = {[key: string]: any}> extends React.Component<PopoverHeaderProps> {}
+6 -6
View File
@@ -4,12 +4,12 @@ import { CSSModule } from '../index';
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export interface RowProps extends Omit<React.HTMLProps<HTMLElement>, 'form'> {
[key: string]: any;
className?: string;
cssModule?: CSSModule;
tag?: React.ReactType;
noGutters?: boolean;
form?: boolean;
[key: string]: any;
className?: string;
cssModule?: CSSModule;
tag?: string | React.ReactType;
noGutters?: boolean;
form?: boolean;
}
declare class Row<T = {[key: string]: any}> extends React.Component<RowProps> {}
+7 -7
View File
@@ -2,13 +2,13 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface SpinnerProps extends React.HTMLProps<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
type?: string;
size?: any;
color?: string;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
type?: string;
size?: any;
color?: string;
className?: string;
cssModule?: CSSModule;
}
declare class Spinner<T = {[key: string]: any}> extends React.Component<SpinnerProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface TabContentProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
activeTab?: number | string;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
tag?: string | React.ReactType;
activeTab?: number | string;
className?: string;
cssModule?: CSSModule;
}
declare class TabContent<T> extends React.Component<TabContentProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface TabPaneProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
tabId?: number | string;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
tabId?: number | string;
}
declare class TabPane<T = {[key: string]: any}> extends React.Component<TabPaneProps> {}
+13 -13
View File
@@ -2,19 +2,19 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface TableProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
className?: string;
cssModule?: CSSModule;
size?: string;
bordered?: boolean;
borderless?: boolean;
striped?: boolean;
inverse?: boolean;
hover?: boolean;
reflow?: boolean;
responsive?: boolean;
tag?: React.ReactType;
responsiveTag?: React.ReactType;
[key: string]: any;
className?: string;
cssModule?: CSSModule;
size?: string;
bordered?: boolean;
borderless?: boolean;
striped?: boolean;
inverse?: boolean;
hover?: boolean;
reflow?: boolean;
responsive?: boolean;
tag?: string | React.ReactType;
responsiveTag?: React.ReactType;
}
declare class Table<T = {[key: string]: any}> extends React.Component<TableProps> {}
+6 -6
View File
@@ -2,12 +2,12 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface TagProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
color?: string;
pill?: boolean;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
[key: string]: any;
color?: string;
pill?: boolean;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
}
declare class Tag<T = {[key: string]: any}> extends React.Component<TagProps> {}
+8 -8
View File
@@ -3,14 +3,14 @@ import { CSSModule } from "../index";
import { FadeProps } from "./Fade";
export interface ToastProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
innerRef?: React.Ref<HTMLElement>;
isOpen?: boolean;
fade?: boolean;
transition?: FadeProps;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
innerRef?: React.Ref<HTMLElement>;
isOpen?: boolean;
fade?: boolean;
transition?: FadeProps;
}
declare class Toast<T> extends React.Component<ToastProps> {}
+5 -5
View File
@@ -2,11 +2,11 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ToastBodyProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
innerRef?: React.Ref<HTMLElement>;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
innerRef?: React.Ref<HTMLElement>;
}
declare class ToastBody<T = {[key: string]: any}> extends React.Component<ToastBodyProps> {}
+10 -10
View File
@@ -2,16 +2,16 @@ import * as React from 'react';
import { CSSModule } from '../index';
export interface ToastHeaderProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ReactType;
className?: string;
cssModule?: CSSModule;
wrapTag?: React.ReactType;
toggle?: () => void;
icon?: string | React.ReactNode;
close?: React.ReactNode;
charCode?: string | number;
closeAriaLabel?: string;
[key: string]: any;
tag?: string | React.ReactType;
className?: string;
cssModule?: CSSModule;
wrapTag?: string | React.ReactType;
toggle?: React.MouseEventHandler<any>;
icon?: string | React.ReactNode;
close?: React.ReactNode;
charCode?: string | number;
closeAriaLabel?: string;
}
declare class ToastHeader<T = {[key: string]: any}> extends React.Component<ToastHeaderProps> {}
+1 -1
View File
@@ -18,7 +18,7 @@ export interface UncontrolledTooltipProps extends React.HTMLAttributes<HTMLEleme
}
export interface TooltipProps extends UncontrolledTooltipProps {
toggle?: () => void;
toggle?: React.MouseEventHandler<any> | (() => void);
isOpen?: boolean;
}
+3 -3
View File
@@ -3898,7 +3898,7 @@ function Example117() {
<UncontrolledButtonDropdown ref={ref}/>;
<UncontrolledDropdown ref={ref}/>;
<UncontrolledTooltip ref={ref} target={null as any}/>;
<UncontrolledCollapse ref={ref} target={null as any}/>;
<UncontrolledCollapse ref={ref} target={null as any} toggler="#foobar"/>;
}
function Example118() {
@@ -4072,7 +4072,7 @@ function AnyPropExample() {
<UncontrolledButtonDropdown_ foo={1} bar={false} foobar="example" />
<UncontrolledDropdown_ foo={1} bar={false} foobar="example" />
<UncontrolledTooltip_ foo={1} bar={false} foobar="example" target="" />
<UncontrolledCollapse_ foo={1} bar={false} foobar="example" target="" />
<UncontrolledCollapse_ foo={1} bar={false} foobar="example" target="" toggler="#foobar" />
</React.Fragment >
);
}
@@ -4243,7 +4243,7 @@ function GenericPropExample() {
<UncontrolledButtonDropdownGeneric foo={1} bar={false} foobar="example" />
<UncontrolledDropdownGeneric foo={1} bar={false} foobar="example" />
<UncontrolledTooltipGeneric foo={1} bar={false} foobar="example" target="" />
<UncontrolledCollapseGeneric foo={1} bar={false} foobar="example" target="" />
<UncontrolledCollapseGeneric foo={1} bar={false} foobar="example" target="" toggler="#foobar" />
</React.Fragment >
);
}