diff --git a/reactstrap/index.d.ts b/reactstrap/index.d.ts new file mode 100644 index 0000000000..198b410ed4 --- /dev/null +++ b/reactstrap/index.d.ts @@ -0,0 +1,82 @@ +// Type definitions for reactstrap 4.3 +// Project: https://github.com/reactstrap/reactstrap#readme +// Definitions by: Ali Hammad Baig , Marco Falkenberg +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export { default as Alert } from './lib/Alert' +export { default as Badge } from './lib/Badge' +export { default as Breadcrumb } from './lib/Breadcrumb' +export { default as BreadcrumbItem } from './lib/BreadcrumbItem' +export { default as Button } from './lib/Button' +export { default as ButtonDropdown } from './lib/ButtonDropdown' +export { default as ButtonGroup } from './lib/ButtonGroup' +export { default as ButtonToolbar } from './lib/ButtonToolbar' +export { default as Card } from './lib/Card' +export { default as CardBlock } from './lib/CardBlock' +export { default as CardColumns } from './lib/CardColumns' +export { default as CardDeck } from './lib/CardDeck' +export { default as CardFooter } from './lib/CardFooter' +export { default as CardGroup } from './lib/CardGroup' +export { default as CardHeader } from './lib/CardHeader' +export { default as CardImg } from './lib/CardImg' +export { default as CardImgOverlay } from './lib/CardImgOverlay' +export { default as CardLink } from './lib/CardLink' +export { default as CardSubtitle } from './lib/CardSubtitle' +export { default as CardText } from './lib/CardText' +export { default as CardTitle } from './lib/CardTitle' +export { default as Col } from './lib/Col' +export { default as Collapse } from './lib/Collapse' +export { default as Container } from './lib/Container' +export { default as Dropdown } from './lib/Dropdown' +export { default as DropdownItem } from './lib/DropdownItem' +export { default as DropdownMenu } from './lib/DropdownMenu' +export { default as DropdownToggle } from './lib/DropdownToggle' +export { default as Fade } from './lib/Fade' +export { default as Form } from './lib/Form' +export { default as FormFeedback } from './lib/FormFeedback' +export { default as FormGroup } from './lib/FormGroup' +export { default as FormText } from './lib/FormText' +export { default as Input } from './lib/Input' +export { default as InputGroup } from './lib/InputGroup' +export { default as InputGroupAddon } from './lib/InputGroupAddon' +export { default as InputGroupButton } from './lib/InputGroupButton' +export { default as Jumbotron } from './lib/Jumbotron' +export { default as Label } from './lib/Label' +export { default as ListGroup } from './lib/ListGroup' +export { default as ListGroupItem } from './lib/ListGroupItem' +export { default as ListGroupItemHeading } from './lib/ListGroupItemHeading' +export { default as ListGroupItemText } from './lib/ListGroupItemText' +export { default as Media } from './lib/Media' +export { default as Modal } from './lib/Modal' +export { default as ModalBody } from './lib/ModalBody' +export { default as ModalFooter } from './lib/ModalFooter' +export { default as ModalHeader } from './lib/ModalHeader' +export { default as Nav } from './lib/Nav' +export { default as Navbar } from './lib/Navbar' +export { default as NavbarBrand } from './lib/NavbarBrand' +export { default as NavbarToggler } from './lib/NavbarToggler' +export { default as NavDropdown } from './lib/NavDropdown' +export { default as NavItem } from './lib/NavItem' +export { default as NavLink } from './lib/NavLink' +export { default as Pagination } from './lib/Pagination' +export { default as PaginationItem } from './lib/PaginationItem' +export { default as PaginationLink } from './lib/PaginationLink' +export { default as Popover } from './lib/Popover' +export { default as PopoverContent } from './lib/PopoverContent' +export { default as PopoverTitle } from './lib/PopoverTitle' +export { default as Progress } from './lib/Progress' +export { default as Row } from './lib/Row' +export { default as TabContent } from './lib/TabContent' +export { default as Table } from './lib/Table' +export { default as TabPane } from './lib/TabPane' +export { default as Tag } from './lib/Tag' +export { default as TetherContent } from './lib/TetherContent' +export { default as Tooltip } from './lib/Tooltip' +export { + UncontrolledAlert, + UncontrolledButtonDropdown, + UncontrolledDropdown, + UncontrolledNavDropdown, + UncontrolledTooltip +} from './lib/Uncontrolled' \ No newline at end of file diff --git a/reactstrap/lib/Alert.d.ts b/reactstrap/lib/Alert.d.ts new file mode 100644 index 0000000000..ebe4f8cccc --- /dev/null +++ b/reactstrap/lib/Alert.d.ts @@ -0,0 +1,16 @@ +export interface UncontrolledProps { + className?: string; + color?: string; + tag?: React.ReactType; + transitionAppearTimeout?: number; + transitionEnterTimeout?: number; + transitionLeaveTimeout?: number; +} + +interface Props extends UncontrolledProps { + isOpen?: boolean; + toggle?: () => void; +} + +declare var Alert: React.StatelessComponent; +export default Alert; \ No newline at end of file diff --git a/reactstrap/lib/Badge.d.ts b/reactstrap/lib/Badge.d.ts new file mode 100644 index 0000000000..0f9c66b691 --- /dev/null +++ b/reactstrap/lib/Badge.d.ts @@ -0,0 +1,9 @@ +interface Props { + color?: string; + pill?: boolean; + tag?: React.ReactType; + className?: string; +} + +declare var Badge: React.StatelessComponent; +export default Badge; \ No newline at end of file diff --git a/reactstrap/lib/Breadcrumb.d.ts b/reactstrap/lib/Breadcrumb.d.ts new file mode 100644 index 0000000000..a6be7ab9fc --- /dev/null +++ b/reactstrap/lib/Breadcrumb.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: string; + className?: string; +} + +declare var Breadcrumb: React.StatelessComponent; +export default Breadcrumb; \ No newline at end of file diff --git a/reactstrap/lib/BreadcrumbItem.d.ts b/reactstrap/lib/BreadcrumbItem.d.ts new file mode 100644 index 0000000000..ce4e8ca522 --- /dev/null +++ b/reactstrap/lib/BreadcrumbItem.d.ts @@ -0,0 +1,12 @@ +interface Props { + tag?: React.ReactType; + active?: boolean; + className?: string; + // if a is passed as a string + // this could be href + [others: string]: any; +} + +declare var BreadcrumbItem: React.StatelessComponent; +export default BreadcrumbItem; + diff --git a/reactstrap/lib/Button.d.ts b/reactstrap/lib/Button.d.ts new file mode 100644 index 0000000000..8ab27dfdcd --- /dev/null +++ b/reactstrap/lib/Button.d.ts @@ -0,0 +1,16 @@ +interface Props extends React.HTMLProps { + outline?: boolean; + active?: boolean; + block?: boolean; + color?: string; + disabled?: boolean; + tag?: React.ReactType; + + onClick?: React.MouseEventHandler; + size?: any; + id?: string; + style?: React.CSSProperties; +} + +declare var Button: React.StatelessComponent; +export default Button; \ No newline at end of file diff --git a/reactstrap/lib/ButtonDropdown.d.ts b/reactstrap/lib/ButtonDropdown.d.ts new file mode 100644 index 0000000000..9ab54c7502 --- /dev/null +++ b/reactstrap/lib/ButtonDropdown.d.ts @@ -0,0 +1,12 @@ +import { + UncontrolledProps as DropdownUncontrolledProps, + Props as DropdownProps +} from './Dropdown'; + +// tslint:disable-next-line +export interface UncontrolledProps extends DropdownUncontrolledProps { } +// tslint:disable-next-line +interface Props extends DropdownProps { } + +declare var ButtonDropdown: React.StatelessComponent; +export default ButtonDropdown; \ No newline at end of file diff --git a/reactstrap/lib/ButtonGroup.d.ts b/reactstrap/lib/ButtonGroup.d.ts new file mode 100644 index 0000000000..a583a41ee0 --- /dev/null +++ b/reactstrap/lib/ButtonGroup.d.ts @@ -0,0 +1,11 @@ +interface Props { + tag?: React.ReactType; + 'aria-label'?: string; + className?: string; + role?: string; + size?: string; + vertical?: boolean; +} + +declare var ButtonGroup: React.StatelessComponent; +export default ButtonGroup; \ No newline at end of file diff --git a/reactstrap/lib/ButtonToolbar.d.ts b/reactstrap/lib/ButtonToolbar.d.ts new file mode 100644 index 0000000000..239c96c01e --- /dev/null +++ b/reactstrap/lib/ButtonToolbar.d.ts @@ -0,0 +1,9 @@ +interface Props { + tag?: React.ReactType; + 'aria-label'?: string; + className?: string; + role?: string; +} + +declare var ButtonToolbar: React.StatelessComponent; +export default ButtonToolbar; \ No newline at end of file diff --git a/reactstrap/lib/Card.d.ts b/reactstrap/lib/Card.d.ts new file mode 100644 index 0000000000..f300b09310 --- /dev/null +++ b/reactstrap/lib/Card.d.ts @@ -0,0 +1,13 @@ +interface Props { + tag?: React.ReactType; + inverse?: boolean; + color?: string; + block?: boolean; + outline?: boolean; + className?: string; + style?: React.CSSProperties; +} + +declare var Card: React.StatelessComponent; +export default Card; + diff --git a/reactstrap/lib/CardBlock.d.ts b/reactstrap/lib/CardBlock.d.ts new file mode 100644 index 0000000000..406f4b8258 --- /dev/null +++ b/reactstrap/lib/CardBlock.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardBlock: React.StatelessComponent; +export default CardBlock; + diff --git a/reactstrap/lib/CardColumns.d.ts b/reactstrap/lib/CardColumns.d.ts new file mode 100644 index 0000000000..a4992b8ffe --- /dev/null +++ b/reactstrap/lib/CardColumns.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardColumns: React.StatelessComponent; +export default CardColumns; \ No newline at end of file diff --git a/reactstrap/lib/CardDeck.d.ts b/reactstrap/lib/CardDeck.d.ts new file mode 100644 index 0000000000..1b70bda457 --- /dev/null +++ b/reactstrap/lib/CardDeck.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardDeck: React.StatelessComponent; +export default CardDeck; \ No newline at end of file diff --git a/reactstrap/lib/CardFooter.d.ts b/reactstrap/lib/CardFooter.d.ts new file mode 100644 index 0000000000..8356b15aef --- /dev/null +++ b/reactstrap/lib/CardFooter.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardFooter: React.StatelessComponent; +export default CardFooter; \ No newline at end of file diff --git a/reactstrap/lib/CardGroup.d.ts b/reactstrap/lib/CardGroup.d.ts new file mode 100644 index 0000000000..c6e956c8a2 --- /dev/null +++ b/reactstrap/lib/CardGroup.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardGroup: React.StatelessComponent; +export default CardGroup; \ No newline at end of file diff --git a/reactstrap/lib/CardHeader.d.ts b/reactstrap/lib/CardHeader.d.ts new file mode 100644 index 0000000000..6977abf238 --- /dev/null +++ b/reactstrap/lib/CardHeader.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardHeader: React.StatelessComponent; +export default CardHeader; \ No newline at end of file diff --git a/reactstrap/lib/CardImg.d.ts b/reactstrap/lib/CardImg.d.ts new file mode 100644 index 0000000000..6a8f85f3b8 --- /dev/null +++ b/reactstrap/lib/CardImg.d.ts @@ -0,0 +1,13 @@ +interface Props { + tag?: React.ReactType; + top?: boolean; + bottom?: boolean; + className?: string; + src?: string; + width?: string; + height?: string; + alt?: string; +} + +declare var CardImg: React.StatelessComponent; +export default CardImg; \ No newline at end of file diff --git a/reactstrap/lib/CardImgOverlay.d.ts b/reactstrap/lib/CardImgOverlay.d.ts new file mode 100644 index 0000000000..40c958fd0e --- /dev/null +++ b/reactstrap/lib/CardImgOverlay.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardImgOverlay: React.StatelessComponent; +export default CardImgOverlay; \ No newline at end of file diff --git a/reactstrap/lib/CardLink.d.ts b/reactstrap/lib/CardLink.d.ts new file mode 100644 index 0000000000..7db1d25a16 --- /dev/null +++ b/reactstrap/lib/CardLink.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + className?: string; + href?: string; +} + +declare var CardLink: React.StatelessComponent; +export default CardLink; \ No newline at end of file diff --git a/reactstrap/lib/CardSubtitle.d.ts b/reactstrap/lib/CardSubtitle.d.ts new file mode 100644 index 0000000000..9a3100bdd1 --- /dev/null +++ b/reactstrap/lib/CardSubtitle.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardSubtitle: React.StatelessComponent; +export default CardSubtitle; \ No newline at end of file diff --git a/reactstrap/lib/CardText.d.ts b/reactstrap/lib/CardText.d.ts new file mode 100644 index 0000000000..a831497faa --- /dev/null +++ b/reactstrap/lib/CardText.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardText: React.StatelessComponent; +export default CardText; diff --git a/reactstrap/lib/CardTitle.d.ts b/reactstrap/lib/CardTitle.d.ts new file mode 100644 index 0000000000..8b8871348d --- /dev/null +++ b/reactstrap/lib/CardTitle.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var CardTitle: React.StatelessComponent; +export default CardTitle; \ No newline at end of file diff --git a/reactstrap/lib/Col.d.ts b/reactstrap/lib/Col.d.ts new file mode 100644 index 0000000000..33a207d329 --- /dev/null +++ b/reactstrap/lib/Col.d.ts @@ -0,0 +1,24 @@ +export type ColumnProps + = string + | boolean + | number + | { + size?: boolean | number | string + push?: string | number + pull?: string | number + offset?: string | number + }; + +interface Props { + xs?: ColumnProps; + sm?: ColumnProps; + md?: ColumnProps; + lg?: ColumnProps; + xl?: ColumnProps; + + //custom widths + widths?: string[]; +} + +declare var Col: React.StatelessComponent; +export default Col; diff --git a/reactstrap/lib/Collapse.d.ts b/reactstrap/lib/Collapse.d.ts new file mode 100644 index 0000000000..ce17d102e3 --- /dev/null +++ b/reactstrap/lib/Collapse.d.ts @@ -0,0 +1,15 @@ +interface Props extends React.HTMLProps { + isOpen?: boolean; + classNames?: string; + tag?: React.ReactType; + navbar?: boolean; + delay?: { + show: number + hide: number + }; + onOpened?: () => void; + onClosed?: () => void; +} + +declare var Collapse: React.StatelessComponent; +export default Collapse; \ No newline at end of file diff --git a/reactstrap/lib/Container.d.ts b/reactstrap/lib/Container.d.ts new file mode 100644 index 0000000000..bb0c9aa7a3 --- /dev/null +++ b/reactstrap/lib/Container.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + fluid?: boolean; + className?: string; +} + +declare var Container: React.StatelessComponent; +export default Container; \ No newline at end of file diff --git a/reactstrap/lib/Dropdown.d.ts b/reactstrap/lib/Dropdown.d.ts new file mode 100644 index 0000000000..57e4532a31 --- /dev/null +++ b/reactstrap/lib/Dropdown.d.ts @@ -0,0 +1,19 @@ +/// + +export interface UncontrolledProps { + isOpen?: boolean; + toggle?: () => void; +} + +export interface Props extends UncontrolledProps { + disabled?: boolean; + dropup?: boolean; + group?: boolean; + size?: string; + tag?: React.ReactType; + tether?: boolean | Tether.ITetherOptions; + className?: string; +} + +declare var Dropdown: React.StatelessComponent; +export default Dropdown; \ No newline at end of file diff --git a/reactstrap/lib/DropdownItem.d.ts b/reactstrap/lib/DropdownItem.d.ts new file mode 100644 index 0000000000..00088966b3 --- /dev/null +++ b/reactstrap/lib/DropdownItem.d.ts @@ -0,0 +1,11 @@ +interface Props { + disabled?: boolean; + divider?: boolean; + tag?: React.ReactType; + header?: boolean; + onClick?: React.MouseEvent; + className?: string; +} + +declare var DropdownItem: React.StatelessComponent; +export default DropdownItem; \ No newline at end of file diff --git a/reactstrap/lib/DropdownMenu.d.ts b/reactstrap/lib/DropdownMenu.d.ts new file mode 100644 index 0000000000..08dd194288 --- /dev/null +++ b/reactstrap/lib/DropdownMenu.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + right?: boolean; + className?: boolean; +} + +declare var DropdownMenu: React.StatelessComponent; +export default DropdownMenu; \ No newline at end of file diff --git a/reactstrap/lib/DropdownToggle.d.ts b/reactstrap/lib/DropdownToggle.d.ts new file mode 100644 index 0000000000..753ef0045c --- /dev/null +++ b/reactstrap/lib/DropdownToggle.d.ts @@ -0,0 +1,16 @@ +interface Props { + caret?: boolean; + className?: string; + disabled?: boolean; + onClick?: React.MouseEventHandler; + 'data-toggle'?: string; + 'aria-haspopup'?: boolean; + split?: boolean; + tag?: React.ReactType; + nav?: boolean; + color?: string; + size?: string; +} + +declare var DropdownToggle: React.StatelessComponent; +export default DropdownToggle; \ No newline at end of file diff --git a/reactstrap/lib/Fade.d.ts b/reactstrap/lib/Fade.d.ts new file mode 100644 index 0000000000..f8776c2709 --- /dev/null +++ b/reactstrap/lib/Fade.d.ts @@ -0,0 +1,17 @@ +interface Props { + baseClass?: string; + baseClassIn?: string; + tag?: React.ReactType; + className?: string; + transitionAppearTimeout?: number; + transitionEnterTimeout?: number; + transitionLeaveTimeout?: number; + transitionAppear?: boolean; + transitionEnter?: boolean; + transitionLeave?: boolean; + onLeave?: () => void; + onEnter?: () => void; +} + +declare var Fade: React.StatelessComponent; +export default Fade; \ No newline at end of file diff --git a/reactstrap/lib/Form.d.ts b/reactstrap/lib/Form.d.ts new file mode 100644 index 0000000000..39f20c28da --- /dev/null +++ b/reactstrap/lib/Form.d.ts @@ -0,0 +1,8 @@ +interface Props extends React.HTMLProps { + inline?: boolean; + tag?: React.ReactType; + className?: string; +} + +declare var Form: React.StatelessComponent; +export default Form; \ No newline at end of file diff --git a/reactstrap/lib/FormFeedback.d.ts b/reactstrap/lib/FormFeedback.d.ts new file mode 100644 index 0000000000..30ecaeea74 --- /dev/null +++ b/reactstrap/lib/FormFeedback.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: string; + className?: string; +} + +declare var FormFeedback: React.StatelessComponent; +export default FormFeedback; \ No newline at end of file diff --git a/reactstrap/lib/FormGroup.d.ts b/reactstrap/lib/FormGroup.d.ts new file mode 100644 index 0000000000..fd2390cdfa --- /dev/null +++ b/reactstrap/lib/FormGroup.d.ts @@ -0,0 +1,11 @@ +interface Props { + row?: boolean; + check?: boolean; + disabled?: boolean; + tag?: React.ReactType; + color?: string; + className?: boolean; +} + +declare var FormGroup: React.StatelessComponent; +export default FormGroup; \ No newline at end of file diff --git a/reactstrap/lib/FormText.d.ts b/reactstrap/lib/FormText.d.ts new file mode 100644 index 0000000000..221a6de013 --- /dev/null +++ b/reactstrap/lib/FormText.d.ts @@ -0,0 +1,9 @@ +interface Props { + inline?: boolean; + tag?: string; + color?: string; + className?: string; +} + +declare var FormText: React.StatelessComponent; +export default FormText; \ No newline at end of file diff --git a/reactstrap/lib/Input.d.ts b/reactstrap/lib/Input.d.ts new file mode 100644 index 0000000000..816add1137 --- /dev/null +++ b/reactstrap/lib/Input.d.ts @@ -0,0 +1,46 @@ +type InputType = + | 'text' + | 'email' + | 'select' + | 'file' + | 'radio' + | 'checkbox' + | 'textarea' + | 'button' + | 'reset' + | 'submit' + | 'date' + | 'datetime-local' + | 'hidden' + | 'image' + | 'month' + | 'number' + | 'range' + | 'search' + | 'tel' + | 'url' + | 'week' + | 'password' + | 'datetime' + | 'time' + | 'color'; + +// Intermediate interface to "redefine" the type of size to string +// size:number => size:any => size:string +interface Intermediate extends React.ChangeTargetHTMLProps { + size?: any; +} + +interface InputProps extends Intermediate { + type?: InputType; + size?: string; + state?: string; + tag?: React.ReactType; + addon?: boolean; + className?: string; + // We don't have the property 'static' here because 'static' is a reserved keyword in TypeScript + // Maybe reactstrap will support an 'isStatic' alias in the future +} + +declare var Input: React.StatelessComponent; +export default Input; \ No newline at end of file diff --git a/reactstrap/lib/InputGroup.d.ts b/reactstrap/lib/InputGroup.d.ts new file mode 100644 index 0000000000..1d2cfb0633 --- /dev/null +++ b/reactstrap/lib/InputGroup.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + size?: string; + className?: string; +} + +declare var InputGroup: React.StatelessComponent; +export default InputGroup; \ No newline at end of file diff --git a/reactstrap/lib/InputGroupAddon.d.ts b/reactstrap/lib/InputGroupAddon.d.ts new file mode 100644 index 0000000000..379c6cc24d --- /dev/null +++ b/reactstrap/lib/InputGroupAddon.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var InputGroupAddon: React.StatelessComponent; +export default InputGroupAddon; \ No newline at end of file diff --git a/reactstrap/lib/InputGroupButton.d.ts b/reactstrap/lib/InputGroupButton.d.ts new file mode 100644 index 0000000000..43017e4a25 --- /dev/null +++ b/reactstrap/lib/InputGroupButton.d.ts @@ -0,0 +1,10 @@ +interface Props { + tag?: React.ReactType; + groupClassName?: string; + groupAttributes?: any; + className?: string; + color?: string; +} + +declare var InputGroupButton: React.StatelessComponent; +export default InputGroupButton; \ No newline at end of file diff --git a/reactstrap/lib/Jumbotron.d.ts b/reactstrap/lib/Jumbotron.d.ts new file mode 100644 index 0000000000..65529d80e7 --- /dev/null +++ b/reactstrap/lib/Jumbotron.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + fluid?: boolean; + className?: string; +} + +declare var Jumbotron: React.StatelessComponent; +export default Jumbotron; \ No newline at end of file diff --git a/reactstrap/lib/Label.d.ts b/reactstrap/lib/Label.d.ts new file mode 100644 index 0000000000..0c7ba166ba --- /dev/null +++ b/reactstrap/lib/Label.d.ts @@ -0,0 +1,20 @@ +import { ColumnProps } from './Col'; + +interface Props { + hidden?: boolean; + check?: boolean; + inline?: boolean; + disabled?: boolean; + size?: string; + for?: string; + tag?: string; + className?: string; + xs?: ColumnProps; + sm?: ColumnProps; + md?: ColumnProps; + lg?: ColumnProps; + xl?: ColumnProps; +} + +declare var Label: React.StatelessComponent; +export default Label; \ No newline at end of file diff --git a/reactstrap/lib/ListGroup.d.ts b/reactstrap/lib/ListGroup.d.ts new file mode 100644 index 0000000000..50e5ecb247 --- /dev/null +++ b/reactstrap/lib/ListGroup.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + flush?: boolean; + className?: string; +} + +declare var ListGroup: React.StatelessComponent; +export default ListGroup; \ No newline at end of file diff --git a/reactstrap/lib/ListGroupItem.d.ts b/reactstrap/lib/ListGroupItem.d.ts new file mode 100644 index 0000000000..a85df43fc1 --- /dev/null +++ b/reactstrap/lib/ListGroupItem.d.ts @@ -0,0 +1,12 @@ +interface Props { + tag?: React.ReactType; + active?: boolean; + disabled?: boolean; + color?: string; + action?: boolean; + className?: string; + href?: string; +} + +declare var ListGroupItem: React.StatelessComponent; +export default ListGroupItem; \ No newline at end of file diff --git a/reactstrap/lib/ListGroupItemHeading.d.ts b/reactstrap/lib/ListGroupItemHeading.d.ts new file mode 100644 index 0000000000..35adbf4d5e --- /dev/null +++ b/reactstrap/lib/ListGroupItemHeading.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var ListGroupItemHeading: React.StatelessComponent; +export default ListGroupItemHeading; \ No newline at end of file diff --git a/reactstrap/lib/ListGroupItemText.d.ts b/reactstrap/lib/ListGroupItemText.d.ts new file mode 100644 index 0000000000..51fc4b0459 --- /dev/null +++ b/reactstrap/lib/ListGroupItemText.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var ListGroupItemText: React.StatelessComponent; +export default ListGroupItemText; \ No newline at end of file diff --git a/reactstrap/lib/Media.d.ts b/reactstrap/lib/Media.d.ts new file mode 100644 index 0000000000..be8c28ada9 --- /dev/null +++ b/reactstrap/lib/Media.d.ts @@ -0,0 +1,18 @@ +interface Props { + body?: boolean; + bottom?: boolean; + className?: string; + heading?: boolean; + left?: boolean; + list?: boolean; + middle?: boolean; + object?: boolean; + right?: boolean; + tag?: React.ReactType; + top?: boolean; + href?: string; + alt?: string; +} + +declare var Media: React.StatelessComponent; +export default Media; \ No newline at end of file diff --git a/reactstrap/lib/Modal.d.ts b/reactstrap/lib/Modal.d.ts new file mode 100644 index 0000000000..60d09d1cb4 --- /dev/null +++ b/reactstrap/lib/Modal.d.ts @@ -0,0 +1,18 @@ +interface Props { + isOpen?: boolean; + size?: string; + toggle?: () => void; + keyboard?: boolean; + backdrop?: boolean | 'static'; + onEnter?: () => void; + onExit?: () => void; + className?: string; + wrapClassName?: string; + modalClassName?: string; + backdropClassName?: string; + contentClassName?: string; + zIndex?: number | string; +} + +declare var Modal: React.StatelessComponent; +export default Modal; \ No newline at end of file diff --git a/reactstrap/lib/ModalBody.d.ts b/reactstrap/lib/ModalBody.d.ts new file mode 100644 index 0000000000..3a09dfed76 --- /dev/null +++ b/reactstrap/lib/ModalBody.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var ModalBody: React.StatelessComponent; +export default ModalBody; \ No newline at end of file diff --git a/reactstrap/lib/ModalFooter.d.ts b/reactstrap/lib/ModalFooter.d.ts new file mode 100644 index 0000000000..b3ec195ed9 --- /dev/null +++ b/reactstrap/lib/ModalFooter.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var ModalFooter: React.StatelessComponent; +export default ModalFooter; \ No newline at end of file diff --git a/reactstrap/lib/ModalHeader.d.ts b/reactstrap/lib/ModalHeader.d.ts new file mode 100644 index 0000000000..decfdab4b0 --- /dev/null +++ b/reactstrap/lib/ModalHeader.d.ts @@ -0,0 +1,9 @@ +interface Props { + tag?: React.ReactType; + className?: string; + wrapTag?: React.ReactType; + toggle?: () => void; +} + +declare var ModalHeader: React.StatelessComponent; +export default ModalHeader; \ No newline at end of file diff --git a/reactstrap/lib/Nav.d.ts b/reactstrap/lib/Nav.d.ts new file mode 100644 index 0000000000..660c2a401c --- /dev/null +++ b/reactstrap/lib/Nav.d.ts @@ -0,0 +1,13 @@ +interface Props { + inline?: boolean; + disabled?: boolean; + tabs?: boolean; + pills?: boolean; + stacked?: boolean; + navbar?: boolean; + tag?: React.ReactType; + className?: string; +} + +declare var Nav: React.StatelessComponent; +export default Nav; \ No newline at end of file diff --git a/reactstrap/lib/NavDropdown.d.ts b/reactstrap/lib/NavDropdown.d.ts new file mode 100644 index 0000000000..6b480d495a --- /dev/null +++ b/reactstrap/lib/NavDropdown.d.ts @@ -0,0 +1,12 @@ +import { + UncontrolledProps as DropdownUncontrolledProps, + Props as DropdownProps +} from './Dropdown'; + +// tslint:disable-next-line +export interface UncontrolledProps extends DropdownUncontrolledProps { } +// tslint:disable-next-line +interface Props extends DropdownProps { } + +declare var NavDropdown: React.StatelessComponent; +export default NavDropdown; \ No newline at end of file diff --git a/reactstrap/lib/NavItem.d.ts b/reactstrap/lib/NavItem.d.ts new file mode 100644 index 0000000000..ee83c5477e --- /dev/null +++ b/reactstrap/lib/NavItem.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var NavItem: React.StatelessComponent; +export default NavItem; \ No newline at end of file diff --git a/reactstrap/lib/NavLink.d.ts b/reactstrap/lib/NavLink.d.ts new file mode 100644 index 0000000000..35da161a1e --- /dev/null +++ b/reactstrap/lib/NavLink.d.ts @@ -0,0 +1,11 @@ +interface Props { + tag?: React.ReactType; + disabled?: boolean; + active?: boolean; + className?: string; + onClick?: React.MouseEventHandler; + href?: string; +} + +declare var NavLink: React.StatelessComponent; +export default NavLink; \ No newline at end of file diff --git a/reactstrap/lib/Navbar.d.ts b/reactstrap/lib/Navbar.d.ts new file mode 100644 index 0000000000..e25aa7bdcb --- /dev/null +++ b/reactstrap/lib/Navbar.d.ts @@ -0,0 +1,15 @@ +interface Props { + light?: boolean; + inverse?: boolean; + full?: boolean; + fixed?: string; + sticky?: string; + color?: string; + role?: string; + tag?: React.ReactType; + className?: string; + toggleable?: boolean | string; +} + +declare var Navbar: React.StatelessComponent; +export default Navbar; \ No newline at end of file diff --git a/reactstrap/lib/NavbarBrand.d.ts b/reactstrap/lib/NavbarBrand.d.ts new file mode 100644 index 0000000000..c99fba6673 --- /dev/null +++ b/reactstrap/lib/NavbarBrand.d.ts @@ -0,0 +1,7 @@ +interface NavbarBrand { + tag?: React.ReactType; + className?: string; +} + +declare var NavbarBrand: React.StatelessComponent>; +export default NavbarBrand; \ No newline at end of file diff --git a/reactstrap/lib/NavbarToggler.d.ts b/reactstrap/lib/NavbarToggler.d.ts new file mode 100644 index 0000000000..083e2920aa --- /dev/null +++ b/reactstrap/lib/NavbarToggler.d.ts @@ -0,0 +1,10 @@ +interface Props extends React.HTMLProps { + tag?: React.ReactType; + type?: string; + className?: string; + right?: boolean; + left?: boolean; +} + +declare var NavbarToggler: React.StatelessComponent; +export default NavbarToggler; \ No newline at end of file diff --git a/reactstrap/lib/Pagination.d.ts b/reactstrap/lib/Pagination.d.ts new file mode 100644 index 0000000000..c7f621f109 --- /dev/null +++ b/reactstrap/lib/Pagination.d.ts @@ -0,0 +1,7 @@ +interface Props { + className?: string; + size?: string; +} + +declare var Pagination: React.StatelessComponent; +export default Pagination; \ No newline at end of file diff --git a/reactstrap/lib/PaginationItem.d.ts b/reactstrap/lib/PaginationItem.d.ts new file mode 100644 index 0000000000..9a85a09891 --- /dev/null +++ b/reactstrap/lib/PaginationItem.d.ts @@ -0,0 +1,9 @@ +interface Props { + className?: string; + active?: boolean; + disabled?: boolean; + tag?: React.ReactType; +} + +declare var PaginationItem: React.StatelessComponent; +export default PaginationItem; \ No newline at end of file diff --git a/reactstrap/lib/PaginationLink.d.ts b/reactstrap/lib/PaginationLink.d.ts new file mode 100644 index 0000000000..a075aa6305 --- /dev/null +++ b/reactstrap/lib/PaginationLink.d.ts @@ -0,0 +1,10 @@ +interface Props extends React.HTMLProps { + 'aria-label'?: string; + className?: string; + next?: boolean; + previous?: boolean; + tag?: React.ReactType; +} + +declare var PaginationLink: React.StatelessComponent; +export default PaginationLink; \ No newline at end of file diff --git a/reactstrap/lib/Popover.d.ts b/reactstrap/lib/Popover.d.ts new file mode 100644 index 0000000000..a1c7f30603 --- /dev/null +++ b/reactstrap/lib/Popover.d.ts @@ -0,0 +1,31 @@ +/// + +type Placement + = 'top' + | 'bottom' + | 'left' + | 'right' + | 'top left' + | 'top center' + | 'top right' + | 'right top' + | 'right middle' + | 'right bottom' + | 'bottom right' + | 'bottom center' + | 'bottom left' + | 'left top' + | 'left middle' + | 'left bottom'; + +interface Props { + placement?: Placement; + target: string; + isOpen?: boolean; + tether?: Tether.ITetherOptions; + className?: string; + toggle?: () => void; +} + +declare var Popover: React.StatelessComponent; +export default Popover; \ No newline at end of file diff --git a/reactstrap/lib/PopoverContent.d.ts b/reactstrap/lib/PopoverContent.d.ts new file mode 100644 index 0000000000..5344b41804 --- /dev/null +++ b/reactstrap/lib/PopoverContent.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var PopoverContent: React.StatelessComponent; +export default PopoverContent; \ No newline at end of file diff --git a/reactstrap/lib/PopoverTitle.d.ts b/reactstrap/lib/PopoverTitle.d.ts new file mode 100644 index 0000000000..6c837868e6 --- /dev/null +++ b/reactstrap/lib/PopoverTitle.d.ts @@ -0,0 +1,7 @@ +interface Props { + tag?: React.ReactType; + className?: string; +} + +declare var PopoverTitle: React.StatelessComponent; +export default PopoverTitle; \ No newline at end of file diff --git a/reactstrap/lib/Progress.d.ts b/reactstrap/lib/Progress.d.ts new file mode 100644 index 0000000000..ea01393b3c --- /dev/null +++ b/reactstrap/lib/Progress.d.ts @@ -0,0 +1,15 @@ +interface Props { + bar?: boolean; + multi?: boolean; + tag?: string; + value?: string | number; + max?: string | number; + animated?: boolean; + striped?: boolean; + color?: string; + className?: string; + barClassName?: string; +} + +declare var Progress: React.StatelessComponent; +export default Progress; \ No newline at end of file diff --git a/reactstrap/lib/Row.d.ts b/reactstrap/lib/Row.d.ts new file mode 100644 index 0000000000..b318b6e6f5 --- /dev/null +++ b/reactstrap/lib/Row.d.ts @@ -0,0 +1,8 @@ +interface Props { + className?: string; + tag?: React.ReactType; + noGutters?: boolean; +} + +declare var Row: React.StatelessComponent>; +export default Row; \ No newline at end of file diff --git a/reactstrap/lib/TabContent.d.ts b/reactstrap/lib/TabContent.d.ts new file mode 100644 index 0000000000..7e5f9120c0 --- /dev/null +++ b/reactstrap/lib/TabContent.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + activeTab?: number | string; + className?: string; +} + +declare var TabContent: React.StatelessComponent; +export default TabContent; \ No newline at end of file diff --git a/reactstrap/lib/TabPane.d.ts b/reactstrap/lib/TabPane.d.ts new file mode 100644 index 0000000000..9add666c8e --- /dev/null +++ b/reactstrap/lib/TabPane.d.ts @@ -0,0 +1,8 @@ +interface Props { + tag?: React.ReactType; + className?: string; + tabId?: number | string; +} + +declare var TabPane: React.StatelessComponent; +export default TabPane; \ No newline at end of file diff --git a/reactstrap/lib/Table.d.ts b/reactstrap/lib/Table.d.ts new file mode 100644 index 0000000000..9c3f27abe8 --- /dev/null +++ b/reactstrap/lib/Table.d.ts @@ -0,0 +1,15 @@ +interface Props { + className?: string; + size?: string; + bordered?: boolean; + striped?: boolean; + inverse?: boolean; + hover?: boolean; + reflow?: boolean; + responsive?: boolean; + tag?: React.ReactType; + responsiveTag?: React.ReactType; +} + +declare var Table: React.StatelessComponent; +export default Table; \ No newline at end of file diff --git a/reactstrap/lib/Tag.d.ts b/reactstrap/lib/Tag.d.ts new file mode 100644 index 0000000000..1ea80359aa --- /dev/null +++ b/reactstrap/lib/Tag.d.ts @@ -0,0 +1,9 @@ +interface Props { + color?: string; + pill?: boolean; + tag?: React.ReactType; + className?: string; +} + +declare var Tag: React.StatelessComponent; +export default Tag; \ No newline at end of file diff --git a/reactstrap/lib/TetherContent.d.ts b/reactstrap/lib/TetherContent.d.ts new file mode 100644 index 0000000000..46a6a7745a --- /dev/null +++ b/reactstrap/lib/TetherContent.d.ts @@ -0,0 +1,15 @@ +/// + +interface Props { + className?: string; + arrow?: string; + disabled?: boolean; + isOpen: boolean; + toggle: () => void; + tether: Tether.ITetherOptions; + tetherRef?: (tether: Tether) => void; + style?: React.CSSProperties; +} + +declare var TetherContent: React.StatelessComponent; +export default TetherContent; \ No newline at end of file diff --git a/reactstrap/lib/Tooltip.d.ts b/reactstrap/lib/Tooltip.d.ts new file mode 100644 index 0000000000..19b45a581e --- /dev/null +++ b/reactstrap/lib/Tooltip.d.ts @@ -0,0 +1,40 @@ +/// + +type Placement + = 'top' + | 'bottom' + | 'left' + | 'right' + | 'top left' + | 'top center' + | 'top right' + | 'right top' + | 'right middle' + | 'right bottom' + | 'bottom right' + | 'bottom center' + | 'bottom left' + | 'left top' + | 'left middle' + | 'left bottom'; + +export interface UncontrolledProps { + placement?: Placement; + target: string; + disabled?: boolean; + tether?: Tether.ITetherOptions; + tetherRef?: (tether: Tether) => void; + className?: string; + autohide?: boolean; + delay?: number | { show: number, hide: number }; +} + +interface Props extends UncontrolledProps { + toggle?: () => void; + isOpen?: boolean; +} + + + +declare var Tooltip: React.StatelessComponent; +export default Tooltip; \ No newline at end of file diff --git a/reactstrap/lib/Uncontrolled.d.ts b/reactstrap/lib/Uncontrolled.d.ts new file mode 100644 index 0000000000..151ee012d3 --- /dev/null +++ b/reactstrap/lib/Uncontrolled.d.ts @@ -0,0 +1,29 @@ +import { + UncontrolledProps as AlertUncontrolledProps +} from './Alert'; +import { + UncontrolledProps as ButtonDropdownUncontrolledProps +} from './ButtonDropdown'; +import { + UncontrolledProps as DropdownUncontrolledProps +} from './Dropdown'; +import { + UncontrolledProps as NavDropdownUncontrolledProps +} from './NavDropdown'; +import { + UncontrolledProps as TooltipUncontrolledProps +} from './Tooltip'; + +declare var UncontrolledAlert: React.StatelessComponent; +declare var UncontrolledButtonDropdown: React.StatelessComponent; +declare var UncontrolledDropdown: React.StatelessComponent; +declare var UncontrolledNavDropdown: React.StatelessComponent; +declare var UncontrolledTooltip: React.StatelessComponent; + +export { + UncontrolledAlert, + UncontrolledButtonDropdown, + UncontrolledDropdown, + UncontrolledNavDropdown, + UncontrolledTooltip +} \ No newline at end of file diff --git a/reactstrap/reactstrap-tests.tsx b/reactstrap/reactstrap-tests.tsx new file mode 100644 index 0000000000..71ab35ff9b --- /dev/null +++ b/reactstrap/reactstrap-tests.tsx @@ -0,0 +1,3240 @@ +import * as React from 'react'; +import { + Alert, + UncontrolledAlert, + Badge, + Breadcrumb, + BreadcrumbItem, + Button, + ButtonDropdown, + ButtonGroup, + ButtonToolbar, + Dropdown, + DropdownItem, + DropdownMenu, + DropdownToggle, + Card, + CardBlock, + CardColumns, + CardDeck, + CardFooter, + CardGroup, + CardHeader, + CardImg, + CardImgOverlay, + CardLink, + CardSubtitle, + CardText, + CardTitle, + Row, + Col, + Container, + Collapse, + Fade, + Form, + FormFeedback, + FormGroup, + FormText, + Input, + InputGroup, + InputGroupAddon, + InputGroupButton, + Pagination, + Label, + ListGroup, + ListGroupItem, + ListGroupItemHeading, + ListGroupItemText, + ModalFooter, + Modal, + ModalBody, + ModalHeader, + Jumbotron, + Media, + Nav, + Navbar, + NavbarBrand, + NavbarToggler, + NavDropdown, + NavItem, + NavLink, + PaginationItem, + PaginationLink, + Popover, + PopoverContent, + PopoverTitle, + Progress, + TabPane, + UncontrolledButtonDropdown, + UncontrolledDropdown, + UncontrolledNavDropdown, + UncontrolledTooltip, + TabContent, + Table, + Tag, + TetherContent, + Tooltip +} from 'reactstrap'; + + +//--------------- Alert +const Examplea = (props: any) => { + return ( +
+ + Well done! You successfully read this important alert message. + + + Heads up! This alert needs your attention, but it's not super important. + + + Warning! Better check yourself, you're not looking too good. + + + Oh snap! Change a few things up and try submitting again. + +
+ ); +}; + +class AlertExample extends React.Component { + constructor(props: any) { + super(props); + + this.state = { + visible: true + } + } + + onDismiss = () => { + this.setState({ visible: false }); + } + + render() { + return ( + + I am an alert and I can be dismissed! + + ); + } +} + +function AlertExample1() { + return ( + + I am an alert and I can be dismissed! + + ); +} + +//--------------- Badge +class Example2 extends React.Component { + render() { + return ( +
+

Heading New

+

Heading New

+

Heading New

+

Heading New

+
Heading New
+
Heading New
+
+ ); + } +} + +export class Example3 extends React.Component { + render() { + return ( +
+ default + primary + success + info + warning + danger +
+ ); + } +} + +class Example4 extends React.Component { + render() { + return ( +
+ default{' '} + primary{' '} + success{' '} + info{' '} + warning{' '} + danger +
+ ); + } +} + +//------------- Breadcrumbs +const Example5 = (props: any) => { + return ( +
+ + Home + + + Home + Library + + + Home + Library + Data + +
+ ); +}; + +const Example6 = (props: any) => { + return ( +
+ + Home + Library + Data + Bootstrap + +
+ ); +}; + +//------------- Buttons +class Example7 extends React.Component { + render() { + return ( +
+ {' '} + {' '} + {' '} + {' '} + {' '} + {' '} + +
+ ); + } +} + +class Example8 extends React.Component { + render() { + return ( +
+ {' '} + {' '} + {' '} + {' '} + {' '} + +
+ ); + } +} + +const Example9 = ( +
+ {' '} + +
+) + +const Example10 = ( +
+ {' '} + +
+) + +const Example11 = ( +
+ + +
+) + +const Example12 = ( +
+ {' '} + +
+) + +const Example13 = ( +
+ {' '} + +
+) + +class Example14 extends React.Component { + constructor(props: any) { + super(props); + + this.state = { cSelected: [] }; + + this.onRadioBtnClick = this.onRadioBtnClick.bind(this); + this.onCheckboxBtnClick = this.onCheckboxBtnClick.bind(this); + } + + onRadioBtnClick(rSelected: number) { + this.setState({ rSelected }); + } + + onCheckboxBtnClick(selected: number) { + const index = this.state.cSelected.indexOf(selected); + if (index < 0) { + this.state.cSelected.push(selected); + } else { + this.state.cSelected.splice(index, 1); + } + this.setState({ cSelected: [...this.state.cSelected] }); + } + + render() { + return ( +
+
Radio Buttons
+ + + + + +

Selected: {this.state.rSelected}

+ +
Checkbox Buttons
+ + + + + +

Selected: {JSON.stringify(this.state.cSelected)}

+
+ ); + } +} + +//------------- Button Dropdown +class Example15 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Button Dropdown + + + Header + Action + Another Action + + Another Action + + + ); + } +} + +const Example16 = ( + true}> + + Text + + + Header + Action + Another Action + + Another Action + + +) + +const Example17 = (props: any) => ( + true}> + + + + Header + Action + Another Action + + Another Action + + +) + +const Example18 = ( +
+ true}> + + Large Button + + + Another Action + Another Action + + + + true}> + + Small Button + + + Another Action + Another Action + + +
+) + +const Example19 = ( + true} dropup> + + Dropup + + + Another Action + Another Action + + +) + + + +//--------------- ButtonGroup +class Example20 extends React.Component { + render() { + return ( + + {' '} + {' '} + + + ); + } +} + +class Example21 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + ); + } +} + +const Example22 = (props: any) => ( +
+ + + + + + + + + + + + + + + + + +
+) + +const Example23 = (props: any) => ( + + + + true}> + + Dropdown + + + Dropdown Link + Dropdown Link + + + + +) + +const Example24 = (props: any) => ( + + + + true}> + + Dropdown + + + Dropdown Link + Dropdown Link + + + +) + + +//------------------ Cards +const Example25 = (props: any) => { + return ( +
+ + + + Card title + Card subtitle + Some quick example text to build on the card title and make up the bulk of the card's content. + + + +
+ ); +}; + +const Example26 = (props: any) => { + return ( +
+ + + Card title + Card subtitle + + Card image cap + + Some quick example text to build on the card title and make up the bulk of the card's content. + Card Link + Another Link + + +
+ ); +}; + +const Example27 = (props: any) => { + return ( + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + ); +}; + +const Example28 = (props: any) => { + return ( +
+ + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
+ ); +}; + +const Example29 = (props: any) => { + return ( +
+ + Header + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + Footer + + + + Featured + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + Footer + +
+ ); +}; + +const Example30 = (props: any) => { + return ( +
+ + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + + +
+ ); +}; + +const Example31 = (props: any) => { + return ( +
+ + + + Card Title + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + Last updated 3 mins ago + + + +
+ ); +}; + +const Example32 = (props: any) => { + return ( +
+ + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
+ ); +}; + +const Example33 = (props: any) => { + return ( +
+ + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + +
+ ); +}; + +const Example34 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This + card has even longer content than the first to show that equal height action. + + + + + + ); +}; + +const Example35 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This card has + even longer content than the first to show that equal height action. + + + + + + ); +}; + +const Example36 = (props: any) => { + return ( + + + + + Card title + Card subtitle + This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. + + + + + + + + + Card title + Card subtitle + This card has supporting text below as a natural lead-in to additional content. + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Card title + Card subtitle + + This is a wider card with supporting text below as a natural lead-in to additional content. This card + has even longer content than the first to show that equal height action. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + ); +}; + + +//------------------ Collapse + +class Example37 extends React.Component { + constructor(props: any) { + super(props); + this.toggle = this.toggle.bind(this); + this.state = { collapse: false }; + } + + toggle() { + this.setState({ collapse: !this.state.collapse }); + } + + render() { + return ( +
+ + + + + Anim pariatur cliche reprehenderit, + enim eiusmod high life accusamus terry richardson ad squid. Nihil + anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. + + + +
+ ); + } +} + +class Example38 extends React.Component { + constructor(props: any) { + super(props); + this.onOpened = this.onOpened.bind(this); + this.onClosed = this.onClosed.bind(this); + this.toggle = this.toggle.bind(this); + this.state = { collapse: false, status: 'Closed' }; + } + + onOpened() { + this.setState({ ...this.state, status: 'Opened' }); + } + + onClosed() { + this.setState({ ...this.state, status: 'Closed' }); + } + + toggle() { + const status = !this.state.collapse ? 'Opening...' : 'Closing...'; + this.setState({ collapse: !this.state.collapse, status }); + } + + render() { + return ( +
+ +
Current state: {this.state.status}
+ + + + Anim pariatur cliche reprehenderit, + enim eiusmod high life accusamus terry richardson ad squid. Nihil + anim keffiyeh helvetica, craft beer labore wes anderson cred + nesciunt sapiente ea proident. + + + +
+ ); + } +} + + +//------- Dropdown + +class Example39 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Dropdown + + + Header + Action + Another Action + + Another Action + + + ); + } +} + +const Example40 = (props: any) => ( + false}> + + Dropdown + + + Header + Action + Another Action + + Another Action + + +) + +const Example41 = (props: any) => ( + Header +) + +const Example42 = (props: any) => ( +
+ + Action + Action + true}> + asdfasd + sadfas + + + true}> + sadfasd + sadf + + + true}> + asdf + sasdfsdf + + +
+) + +class Example43 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( + + + Custom Dropdown Content + + +
Custom dropdown item
+
Custom dropdown item
+
Custom dropdown item
+
Custom dropdown item
+
+
+ ); + } +} + +function Example44() { + return ( + + + Dropdown + + + Header + Action + Another Action + + Another Action + + + ); +} + + +//------------------ Form +class Example45 extends React.Component { + render() { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + Radio Buttons + + + + + + + + + + + + + + +
+ ); + } +} + +class Example46 extends React.Component { + render() { + return ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + + Radio Buttons + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ); + } +} + +class Example47 extends React.Component { + render() { + return ( +
+ + {' '} + + + {' '} + + {' '} + + + {' '} + +
+ ); + } +} + +class Example48 extends React.Component { + render() { + return ( +
+ + + + Success! You did it! + Example help text that remains unchanged. + + + + + Whoops, check your formatting and try again. + Example help text that remains unchanged. + + + + + Oh noes! that name is already taken + Example help text that remains unchanged. + +
+ ); + } +} + +class Example49 extends React.Component { + render() { + return ( +
+ + + Some static value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This is some placeholder block-level help text for the above input. + It's a bit lighter and easily wraps to a new line. + + + + + + + + +
+ ); + } +} + +class Example50 extends React.Component { + render() { + return ( +
+ + + + + + + + + + + + +
+ ); + } +} + +class Example51 extends React.Component { + render() { + return ( +
+ + + + + {' '} + + + + + {' '} + +
+ ); + } +} + +const Example52 = (props: any) => { + return ( +
+ + @ + + +
+ + + + + + +
+ + + @example.com + +
+ + $ + $ + + $ + $ + +
+ + $ + + .00 + +
+ ); +}; + +const Example53 = (props: any) => { + return ( +
+ + To the Left! + + +
+ + + To the Right! + +
+ + To the Left! + + To the Right! + +
+ ); +} + +const Example54 = (props: any) => { + return ( +
+ + @lg + + +
+ + @normal + + +
+ + @sm + + +
+ ); +}; + +const Example55 = (props: any) => { + return ( +
+ + + + +
+ + + + +
+ + + + + +
+ ); +}; + +const Example56 = (props: any) => { + return ( +
+ + @lg + + +
+ + @normal + + +
+ + @sm + + +
+ ); +}; + +const Example57 = (props: any) => { + return ( +
+ + + + +
+ + + + +
+ + + + + +
+ ); +}; + +const Example58 = (props: any) => { + return ( +
+ + To the Left! + + +
+ + + To the Right! + +
+ + To the Left! + + To the Right! + +
+ ); +}; + +const Example59 = (props: any) => { + return ( +
+ +

Hello, world!

+

This is a simple hero unit, a simple Jumbotron-style component for calling extra attention to featured content or information.

+
+

It uses utility classes for typgraphy and spacing to space content out within the larger container.

+

+ +

+
+
+ ); +}; + + +const Example60 = (props: any) => { + return ( +
+ + +

Fluid jumbotron

+

This is a modified jumbotron that occupies the entire horizontal space of its parent.

+
+
+
+ ); +}; + +class Example61 extends React.Component { + render() { + return ( + + + .col + + + .col + .col + .col + .col + + + .col-3 + .col-auto - variable width content + .col-3 + + + .col-6 + .col-6 + + + .col-6 .col-sm-4 + .col-6 .col-sm-4 + .col .col-sm-4 + + + .col .col-sm-6 .col-sm-push-2 .col-sm-pull-2 .col-sm-offset-2 + + + .col .col-sm-12 .col-md-6 .col-md-offset-3 + + + .col .col-sm .col-sm-offset-1 + .col .col-sm .col-sm-offset-1 + + + ); + } +} + +class Example62 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + + ); + } +} + +class Example63 extends React.Component { + render() { + return ( + + Cras justo odio 14 + Dapibus ac facilisis in 2 + Morbi leo risus 1 + + ); + } +} + +class Example64 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + + ); + } +} + +class Example65 extends React.Component { + render() { + return ( +
+

Anchors

+

Be sure to not use the standard .btn classes here.

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

+

Buttons

+ + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + Vestibulum at eros + +
+ ); + } +} + +class Example66 extends React.Component { + render() { + return ( + + Cras justo odio + Dapibus ac facilisis in + Morbi leo risus + Porta ac consectetur ac + + ); + } +} + +class Example67 extends React.Component { + render() { + return ( + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + List group item heading + + Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. + + + + ); + } +} + +// ------------- Media +const Example68 = () => { + return ( + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus + odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. + Donec lacinia congue felis in faucibus. + + + ); +}; + +const Example69 = () => { + return ( + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus + odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. + Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + ); +}; + +const Example70 = () => { + return ( +
+ + + + + + + Top aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + Middle aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + Bottom aligned media + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + +
+ ); +}; + +const Example71 = () => { + return ( + + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. + Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi + vulputate fringilla. Donec lacinia congue felis in faucibus. + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. + Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi + vulputate fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + + + + Nested media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + + Media heading + + Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras + purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate + fringilla. Donec lacinia congue felis in faucibus. + + + + + + + ); +}; + + +//--------------- Modal +class ModalExample72 extends React.Component { + constructor(props: any) { + super(props); + this.state = { + modal: false + }; + + this.toggle = this.toggle.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + render() { + return ( +
+ + + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat + nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit + anim id est laborum. + + + {' '} + + + +
+ ); + } +} + +class ModalExample73 extends React.Component { + constructor(props: any) { + super(props); + this.state = { + modal: false, + backdrop: true + }; + + this.toggle = this.toggle.bind(this); + this.changeBackdrop = this.changeBackdrop.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + changeBackdrop(e: React.ChangeEvent) { + let value = e.target.value; + if (value !== 'static') { + value = JSON.parse(value); + } + this.setState({ backdrop: value }); + } + + render() { + return ( +
+
e.preventDefault()}> + + {' '} + + + + + + + {' '} + +
+ + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. + + + {' '} + + + +
+ ); + } +} + +class ModalExample74 extends React.Component { + constructor(props: any) { + super(props); + this.state = { + modal: false, + nestedModal: false, + }; + + this.toggle = this.toggle.bind(this); + this.toggleNested = this.toggleNested.bind(this); + } + + toggle() { + this.setState({ + modal: !this.state.modal + }); + } + + toggleNested() { + this.setState({ + nestedModal: !this.state.nestedModal + }); + } + + render() { + return ( +
+ + + Modal title + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. +
+ + + Nested Modal title + Stuff and things + + {' '} + + + +
+ + {' '} + + +
+
+ ); + } +} + +class Example75 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + isOpen: false + }; + } + toggle() { + this.setState({ + isOpen: !this.state.isOpen + }); + } + render() { + return ( +
+ + + reactstrap + + + + +
+ ); + } +} + +class Example76 extends React.Component { + constructor(props: any) { + super(props); + + this.toggleNavbar = this.toggleNavbar.bind(this); + this.state = { + collapsed: true + }; + } + + toggleNavbar() { + this.setState({ + collapsed: !this.state.collapsed + }); + } + render() { + return ( +
+ + + + reactstrap + + + +
+ ); + } +} + +class Example77 extends React.Component { + render() { + return ( +
+

List Based

+ +
+

Link Based

+ +
+ ); + } +} + +class Example78 extends React.Component { + render() { + return ( +
+

List Based

+ +
+

Link based

+ +
+ ); + } +} + +class Example79 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( +
+ +
+ ); + } +} + +class Example80 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + dropdownOpen: false + }; + } + + toggle() { + this.setState({ + dropdownOpen: !this.state.dropdownOpen + }); + } + + render() { + return ( +
+ +
+ ); + } +} + +//----------- Pagination +class Example81 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + + + ); + } +} + + +class Example82 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + + + ); + } +} + + +class Example83 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + ); + } +} + +class Example84 extends React.Component { + render() { + return ( + + + + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + ); + } +} + + +//------------------------- Popover +class Example85 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + popoverOpen: false + }; + } + + toggle() { + this.setState({ + popoverOpen: !this.state.popoverOpen + }); + } + + render() { + return ( +
+ + + Popover Title + Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. + +
+ ); + } +} + +class PopoverItem extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + popoverOpen: false + }; + } + + toggle() { + this.setState({ + popoverOpen: !this.state.popoverOpen + }); + } + + render() { + return ( + + + + Popover Title + Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. + + + ); + } +} + +class PopoverExampleMulti extends React.Component { + constructor(props: any) { + super(props); + + this.state = { + popovers: [ + { + placement: 'top', + text: 'Top' + }, + { + placement: 'bottom', + text: 'Bottom' + }, + { + placement: 'left', + text: 'Left' + }, + { + placement: 'right', + text: 'Right' + } + ] + }; + } + + render() { + return ( +
+ {this.state.popovers.map((popover, i) => { + return ; + })} +
+ ); + } +} + + +//------------------------- Progress + +const Example86 = (props: any) => { + return ( +
+
0%
+ +
25%
+ +
50%
+ +
75%
+ +
100%
+ +
Multiple bars
+ + + + + + + +
+ ); +}; + +const Example87 = (props: any) => { + return ( +
+ + + + + +
+ ); +}; + +const Example88 = (props: any) => { + return ( +
+ 25% + 1/2 + You're almost there! + You did it! + + Meh + Wow! + Cool + 20% + !! + +
+ ); +}; + +const Example89 = (props: any) => { + return ( +
+ + + + + + + + + + + +
+ ); +}; + +const Example90 = (props: any) => { + return ( +
+ + + + + + + + + + + +
+ ); +}; + +const Example91 = (props: any) => { + return ( +
+
Plain
+ + + + + + + +
With Labels
+ + Meh + Wow! + 25% + LOOK OUT!! + +
Stripes and Animations
+ + Stripes + Animated Stripes + Plain + +
+ ); +}; + +const Example92 = (props: any) => { + return ( +
+
1 of 5
+ +
50 of 135
+ +
75 of 111
+ +
463 of 500
+ + +
Various (40) of 55
+ + 5 + 15 + 10 + 10 + +
+ ); +}; + + +//--------------- Table +class Example93 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example94 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example95 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example96 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example97 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example98 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+ ); + } +} + +class Example99 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
+ ); + } +} + +class Example100 extends React.Component { + render() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
+ ); + } +} + +class Example101 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + activeTab: '1' + }; + } + + toggle(tab: string) { + if (this.state.activeTab !== tab) { + this.setState({ + activeTab: tab + }); + } + } + render() { + return ( +
+ + + + + +

Tab 1 Contents

+ +
+
+ + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + + Special Title Treatment + With supporting text below as a natural lead-in to additional content. + + + + + +
+
+ ); + } +} + + +class Example102 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( +
+

Somewhere in here is a tooltip.

+ + Hello world! + +
+ ); + } +} + + +class Example103 extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( +
+

Sometimes you need to allow users to select text within a tooltip.

+ + Try to select this text! + +
+ ); + } +} + +class TooltipItem extends React.Component { + constructor(props: any) { + super(props); + + this.toggle = this.toggle.bind(this); + this.state = { + tooltipOpen: false + }; + } + + toggle() { + this.setState({ + tooltipOpen: !this.state.tooltipOpen + }); + } + + render() { + return ( + + + + Tooltip Content! + + + ); + } +} + +class TooltipExampleMulti extends React.Component { + constructor(props: any) { + super(props); + + this.state = { + tooltips: [ + { + placement: 'top', + text: 'Top' + }, + { + placement: 'bottom', + text: 'Bottom' + }, + { + placement: 'left', + text: 'Left' + }, + { + placement: 'right', + text: 'Right' + } + ] + }; + } + + render() { + return ( +
+ {this.state.tooltips.map((tooltip: {placement: string; text: string; }, i: number) => { + return ; + })} +
+ ); + } +} + +function Example() { + return ( +
+

Somewhere in here is a tooltip.

+ + Hello world! + +
+ ); +} diff --git a/reactstrap/tsconfig.json b/reactstrap/tsconfig.json new file mode 100644 index 0000000000..593d60e0ec --- /dev/null +++ b/reactstrap/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "jsx": "react", + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "reactstrap-tests.tsx" + ] +} \ No newline at end of file diff --git a/reactstrap/tslint.json b/reactstrap/tslint.json new file mode 100644 index 0000000000..2221e40e4a --- /dev/null +++ b/reactstrap/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" } \ No newline at end of file