/* 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 (
{ButtonDropdownExampleSource}
{`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
};`}
{`
Text
Header
Action
Another Action
Another Action
`}
{`
Header
Action
Another Action
Another Action
`}
{`
Large Button
Another Action
Another Action
Small Button
Another Action
Another Action
`}
{`
Dropup
Another Action
Another Action
`}