/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ import React from 'react'; import { PrismCode } from 'react-prism'; import Helmet from 'react-helmet'; import { Button, ButtonDropdown, DropdownToggle, DropdownItem, DropdownMenu } from 'reactstrap'; import Example from '../examples/ButtonDropdownMulti'; import ExampleSplit from '../examples/ButtonDropdownMultiSplit'; import ButtonDropdownExample from '../examples/ButtonDropdown'; const ButtonDropdownExampleSource = require('!!raw!../examples/ButtonDropdown'); export default class ButtonDropdownPage extends React.Component { constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { dropdownOpen: false }; } toggle() { this.setState({ dropdownOpen: !this.state.dropdownOpen }); } render() { return (

Button Dropdown

          
            {ButtonDropdownExampleSource}
          
        

Properties

          
{`ButtonDropdown.propTypes = {
  disabled: PropTypes.bool,
  dropup: PropTypes.bool,
  group: PropTypes.bool,
  isOpen: PropTypes.bool,
  tag: PropTypes.string,
  toggle: PropTypes.func
};

DropdownToggle.propTypes = {
  caret: PropTypes.bool,
  color: PropTypes.string,
  disabled: PropTypes.bool,
  onClick: PropTypes.func,
  'data-toggle': PropTypes.string,
  'aria-haspopup': PropTypes.bool
};`}
          
        

Single button dropdowns

          
{`
  
    Text
  
  
    Header
    Action
    Another Action
    
    Another Action
  
`}
          
        

Split button dropdowns

          
{`
  
  
  
    Header
    Action
    Another Action
    
    Another Action
  
`}
          
        

Sizing

{ this.setState({ btnLg: !this.state.btnLg }); }}> Large Button Another Action Another Action
{ this.setState({ btnSm: !this.state.btnSm }); }}> Small Button Another Action Another Action
          
{`
  
    Large Button
  
  
    Another Action
    Another Action
  



  
    Small Button
  
  
    Another Action
    Another Action
  
`}
          
        

Dropup variation

{ this.setState({ btnDropup: !this.state.btnDropup }); }}> Dropup Another Action Another Action
          
{`
  
    Dropup
  
  
    Another Action
    Another Action
  
`}
          
        
); } }