Skip to content

Commit

Permalink
Merge pull request react-bootstrap#1328 from taion/Dropdown-exports
Browse files Browse the repository at this point in the history
Make Dropdown exports CommonJS-friendly
  • Loading branch information
AlexKVal committed Sep 18, 2015
2 parents d344842 + a97967f commit 93fe441
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/ReactPlayground.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Col = require('../../src/Col');
const Collapse = require('../../src/Collapse');
const CollapsibleMixin = require('../../src/CollapsibleMixin');
const CollapsibleNav = require('../../src/CollapsibleNav');
const Dropdown = require('../../src/Dropdown').default;
const Dropdown = require('../../src/Dropdown');
const DropdownButton = require('../../src/DropdownButton');
const DropdownMenu = require('../../src/DropdownMenu');
const Fade = require('../../src/Fade');
Expand Down
7 changes: 4 additions & 3 deletions src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ import activeElement from 'dom-helpers/activeElement';
import contains from 'dom-helpers/query/contains';

const TOGGLE_REF = 'toggle-btn';

export const TOGGLE_ROLE = DropdownToggle.defaultProps.bsRole;
export const MENU_ROLE = DropdownMenu.defaultProps.bsRole;
const TOGGLE_ROLE = DropdownToggle.defaultProps.bsRole;
const MENU_ROLE = DropdownMenu.defaultProps.bsRole;

class Dropdown extends React.Component {

Expand Down Expand Up @@ -228,6 +227,8 @@ class Dropdown extends React.Component {
Dropdown.Toggle = DropdownToggle;

Dropdown.TOGGLE_REF = TOGGLE_REF;
Dropdown.TOGGLE_ROLE = TOGGLE_ROLE;
Dropdown.MENU_ROLE = MENU_ROLE;

Dropdown.defaultProps = {
componentClass: ButtonGroup
Expand Down

0 comments on commit 93fe441

Please sign in to comment.