diff --git a/types/reactstrap/index.d.ts b/types/reactstrap/index.d.ts index cd5111e1c3..4040355fc6 100644 --- a/types/reactstrap/index.d.ts +++ b/types/reactstrap/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for reactstrap 8.0 +// Type definitions for reactstrap 8.2 // Project: https://github.com/reactstrap/reactstrap#readme // Definitions by: Ali Hammad Baig // Marco Falkenberg @@ -31,6 +31,8 @@ export { default as ButtonDropdown } from './lib/ButtonDropdown'; export { ButtonDropdownProps } from './lib/ButtonDropdown'; export { default as ButtonGroup } from './lib/ButtonGroup'; export { ButtonGroupProps } from './lib/ButtonGroup'; +export { default as ButtonToggle } from './lib/ButtonToggle'; +export { ButtonToggleProps } from './lib/ButtonToggle'; export { default as ButtonToolbar } from './lib/ButtonToolbar'; export { ButtonToolbarProps } from './lib/ButtonToolbar'; export { default as Card } from './lib/Card'; @@ -133,6 +135,8 @@ export { default as Navbar } from './lib/Navbar'; export { NavbarProps } from './lib/Navbar'; export { default as NavbarBrand } from './lib/NavbarBrand'; export { NavbarBrandProps } from './lib/NavbarBrand'; +export { default as NavbarText } from './lib/NavbarText'; +export { NavbarTextProps } from './lib/NavbarText'; export { default as NavbarToggler } from './lib/NavbarToggler'; export { NavbarTogglerProps } from './lib/NavbarToggler'; export { default as NavItem } from './lib/NavItem'; diff --git a/types/reactstrap/lib/Button.d.ts b/types/reactstrap/lib/Button.d.ts index afd4217e89..b407492eff 100644 --- a/types/reactstrap/lib/Button.d.ts +++ b/types/reactstrap/lib/Button.d.ts @@ -11,10 +11,11 @@ export interface ButtonProps extends React.ButtonHTMLAttributes; onClick?: React.MouseEventHandler; - size?: any; + size?: string; id?: string; style?: React.CSSProperties; cssModule?: CSSModule; + close?: boolean; } declare class Button extends React.Component {} diff --git a/types/reactstrap/lib/ButtonToggle.d.ts b/types/reactstrap/lib/ButtonToggle.d.ts new file mode 100644 index 0000000000..fb7667528d --- /dev/null +++ b/types/reactstrap/lib/ButtonToggle.d.ts @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +type Omit = Pick>; + +export interface ButtonToggleProps extends Omit, 'defaultValue'> { + [key: string]: any; + onClick?: React.MouseEventHandler; + onBlur?: React.FocusEventHandler; + onFocus?: React.FocusEventHandler; + defaultValue?: boolean; +} + +declare class ButtonToggle extends React.Component {} +export default ButtonToggle; diff --git a/types/reactstrap/lib/Container.d.ts b/types/reactstrap/lib/Container.d.ts index cfce37bcf5..262c9c2069 100644 --- a/types/reactstrap/lib/Container.d.ts +++ b/types/reactstrap/lib/Container.d.ts @@ -4,7 +4,7 @@ import { CSSModule } from '../index'; export interface ContainerProps extends React.HTMLAttributes { [key: string]: any; tag?: string | React.ReactType; - fluid?: boolean; + fluid?: boolean | string; className?: string; cssModule?: CSSModule; } diff --git a/types/reactstrap/lib/Dropdown.d.ts b/types/reactstrap/lib/Dropdown.d.ts index b5823a0843..bdae3e8a25 100644 --- a/types/reactstrap/lib/Dropdown.d.ts +++ b/types/reactstrap/lib/Dropdown.d.ts @@ -9,6 +9,7 @@ export type Direction = export interface DropdownProps extends React.HTMLAttributes { [key: string]: any; + a11y?: boolean; disabled?: boolean; direction?: Direction; group?: boolean; @@ -28,6 +29,7 @@ export interface DropdownProps extends React.HTMLAttributes { export interface UncontrolledDropdownProps extends DropdownProps { defaultOpen?: boolean; + onToggle?: (event: React.KeyboardEvent | React.MouseEvent, isOpen: boolean) => void; } declare class Dropdown extends React.Component {} diff --git a/types/reactstrap/lib/ListGroup.d.ts b/types/reactstrap/lib/ListGroup.d.ts index 65d85eb5f2..00238dda95 100644 --- a/types/reactstrap/lib/ListGroup.d.ts +++ b/types/reactstrap/lib/ListGroup.d.ts @@ -5,6 +5,7 @@ export interface ListGroupProps extends React.HTMLAttributes { [key: string]: any; tag?: string | React.ReactType; flush?: boolean; + horizontal?: boolean | string; className?: string; cssModule?: CSSModule; } diff --git a/types/reactstrap/lib/NavbarText.d.ts b/types/reactstrap/lib/NavbarText.d.ts new file mode 100644 index 0000000000..1f607adb2d --- /dev/null +++ b/types/reactstrap/lib/NavbarText.d.ts @@ -0,0 +1,12 @@ +import * as React from 'react'; +import { CSSModule } from '../index'; + +export interface NavbarTextProps extends React.HTMLProps { + [key: string]: any; + tag?: string | React.ReactType; + className?: string; + cssModule?: CSSModule; +} + +declare class NavbarText extends React.Component {} +export default NavbarText; diff --git a/types/reactstrap/lib/Popover.d.ts b/types/reactstrap/lib/Popover.d.ts index f0b5231105..1e314e4115 100644 --- a/types/reactstrap/lib/Popover.d.ts +++ b/types/reactstrap/lib/Popover.d.ts @@ -11,6 +11,7 @@ export interface PopoverProps extends React.HTMLAttributes { boundariesElement?: Popper.Boundary | Element; className?: string; placement?: Popper.Placement; + popperClassName?: string; innerClassName?: string; disabled?: boolean; hideArrow?: boolean; diff --git a/types/reactstrap/lib/Row.d.ts b/types/reactstrap/lib/Row.d.ts index 8c1bcc704c..6db5a37faf 100644 --- a/types/reactstrap/lib/Row.d.ts +++ b/types/reactstrap/lib/Row.d.ts @@ -10,6 +10,11 @@ export interface RowProps extends Omit, 'form'> { tag?: string | React.ReactType; noGutters?: boolean; form?: boolean; + xs?: number | string; + sm?: number | string; + md?: number | string; + lg?: number | string; + xl?: number | string; } declare class Row extends React.Component {} diff --git a/types/reactstrap/lib/Tooltip.d.ts b/types/reactstrap/lib/Tooltip.d.ts index 7ed3201bce..1b57520d4c 100644 --- a/types/reactstrap/lib/Tooltip.d.ts +++ b/types/reactstrap/lib/Tooltip.d.ts @@ -8,6 +8,7 @@ export interface UncontrolledTooltipProps extends React.HTMLAttributes { } } +const ExampleButtonClose = () => ( +
+ + + + + + + + Custom content and aria-label + + + + +
+); + +class ExampleButtonToggle extends React.Component { + render() { + return ( +
+ primary{' '} + secondary{' '} + success{' '} + info{' '} + warning{' '} + danger{' '} +
+ ); + } +} + // ------------- Button Dropdown class Example15 extends React.Component { state: any; @@ -1695,6 +1739,56 @@ class Example61 extends React.Component { } } +const ExampleResponsiveContainer = (props: any) => { + return ( + <> + .container + .container-sm + .container-md + .container-lg + .container-xl + .container-fluid + + ); +}; + +const ExampleRowColumns = (props: any) => { + return ( + + + Column + Column + Column + Column + + + Column + Column + Column + Column + + + Column + Column + Column + Column + + + Column + Column + Column + Column + + + Column + Column + Column + Column + + + ); +}; + class Example62 extends React.Component { render() { return ( @@ -1802,6 +1896,42 @@ class Example67 extends React.Component { } } +const ExampleListGroupFlush = (props: any) => { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + + ); +}; + +const ExampleListGroupHorizontal = (props: any) => { + return ( +
+

The horizontal prop can be a Boolean or a string specifying one of Bootstrap's breakpoints

+ + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + +

This list group is horizontal at the lg breakpoint and up.

+ + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + +

Note that horizontal list groups cannot be combined with flush list groups. If flush is true then horizontal has no effect.

+
+ ); +}; + // ------------- Media const Example68 = () => { return ( @@ -2257,7 +2387,7 @@ class Example75 extends React.Component { Github - + {}} a11y> Options @@ -2275,6 +2405,7 @@ class Example75 extends React.Component { + Simple Text @@ -3436,7 +3567,7 @@ function Example() { return (

Somewhere in here is a tooltip.

- + Hello world!
@@ -4497,7 +4628,7 @@ function Example125() { function Example126() { return (
- + Popover Title Lorem ipsum dolor sit amet