From fc5426e15bcc1c0adaf9f86d34457cf551397ef5 Mon Sep 17 00:00:00 2001 From: Cheton Wu Date: Thu, 11 Jan 2018 17:31:41 +0800 Subject: [PATCH] example: dropdown in dropdown --- examples/DropdownButton.jsx | 32 +++++++++++++-- examples/DropdownInDropdown.jsx | 73 +++++++++++++++++++++++++++++++++ examples/index.jsx | 4 ++ 3 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 examples/DropdownInDropdown.jsx diff --git a/examples/DropdownButton.jsx b/examples/DropdownButton.jsx index bfbb501..118afbc 100644 --- a/examples/DropdownButton.jsx +++ b/examples/DropdownButton.jsx @@ -10,12 +10,38 @@ export default () => (
General
- - + { + }} + > + Large - Action + + { + event.stopPropagation(); + }} + onSelect={(eventKey, event) => { + }} + > + + ... + + + + Another Action + + + Another Action + + + + Another Action Something else here diff --git a/examples/DropdownInDropdown.jsx b/examples/DropdownInDropdown.jsx new file mode 100644 index 0000000..a4fa258 --- /dev/null +++ b/examples/DropdownInDropdown.jsx @@ -0,0 +1,73 @@ +import React from 'react'; +import Section from './Section'; +import Dropdown, { MenuItem } from '../src'; +import styles from './index.styl'; + +export default () => ( +
+
+

Dropdown In Dropdown

+ + + Select an option + + + + Menu item one + { + event.stopPropagation(); + }} + > + + + + + Action + Rename + Delete + + + + + Menu item two + { + event.stopPropagation(); + }} + > + + + + + Action + Rename + Delete + + + + + +
+
+); diff --git a/examples/index.jsx b/examples/index.jsx index cb603d9..fda7b03 100644 --- a/examples/index.jsx +++ b/examples/index.jsx @@ -6,6 +6,7 @@ import ReactDOM from 'react-dom'; import Nav from './Nav'; import DropdownButton from './DropdownButton'; import DropdownMenu from './DropdownMenu'; +import DropdownInDropdown from './DropdownInDropdown'; import DropdownMenuWrapper from './DropdownMenuWrapper'; import AutoOpen from './AutoOpen'; import Disabled from './Disabled'; @@ -35,6 +36,9 @@ class App extends React.Component {
+
+ +