import React, { Component } from 'react'; import { Button, ButtonDropdown, Card, CardBody, CardHeader, Col, DropdownItem, DropdownMenu, DropdownToggle, Row } from 'reactstrap'; class ButtonDropdowns extends Component { constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { dropdownOpen: new Array(19).fill(false), }; } toggle(i) { const newArray = this.state.dropdownOpen.map((element, index) => { return (index === i ? !element : false); }); this.setState({ dropdownOpen: newArray, }); } render() { return (
Button Dropdown
docs
{ this.toggle(0); }}> Button Dropdown Header Action Disabled Action Another Action
Single button dropdowns { this.toggle(1); }}> Primary Header Action Disabled Action Another Action { this.toggle(2); }}> Secondary Header Action Disabled Action Another Action { this.toggle(3); }}> Success Header Action Disabled Action Another Action { this.toggle(4); }}> Info Header Action Disabled Action Another Action { this.toggle(5); }}> Warning Header Action Disabled Action Another Action { this.toggle(6); }}> Danger Header Action Disabled Action Another Action Split button dropdowns { this.toggle(7); }}> Header Action Disabled Action Another Action { this.toggle(8); }}> Header Action Disabled Action Another Action { this.toggle(9); }}> Header Action Disabled Action Another Action { this.toggle(10); }}> Header Action Disabled Action Another Action { this.toggle(11); }}> Header Action Disabled Action Another Action { this.toggle(12); }}> Header Action Disabled Action Another Action Dropdown directions { this.toggle(15); }}> Direction Up Header Action Disabled Action Another Action { this.toggle(16); }}> Direction Left Header Action Disabled Action Another Action { this.toggle(17); }}> Direction Right Header Action Disabled Action Another Action { this.toggle(18); }}> Default Down Header Action Disabled Action Another Action Button Dropdown sizing { this.toggle(13); }}> Large Button Header Action Disabled Action Another Action { this.toggle(14); }}> Small Button Header Action Disabled Action Another Action
); } } export default ButtonDropdowns;