Skip to content

Commit

Permalink
breaking: remove "flex" prop to avoid warnings emitted by autoprefixer (
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Mar 28, 2018
1 parent 2bd0eef commit a264f4d
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 34 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ rootCloseEvent | One of:<br/>'click'<br/>'mousedown' | | Which event when fired
Name | Type | Default | Description
:--- | :--- | :------ | :----------
componentClass | element | div | A custom element for this component.
flex | boolean | false | Whether to use the flexbox layout.
open | boolean | false | Whether or not the dropdown is visible.
pullRight | boolean | false | Align the menu to the right side of the dropdown toggle.
onClose | function(event) | | A callback fired when the dropdown menu closes.
Expand Down
12 changes: 2 additions & 10 deletions dist/react-dropdown.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/react-dropdown.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
</head>
<body>
<div id="container"></div>
<script type="text/javascript" src="bundle.js?af74ce99b2d7e80e612a"></script></body>
<script type="text/javascript" src="bundle.js?34f7587a0d3a7e3e8dc8"></script></body>
</html>
8 changes: 3 additions & 5 deletions examples/DropdownMenuWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ export default () => (
<Dropdown
open
onToggle={() => {}}
style={{ width: '100%' }}
>
<Dropdown.Toggle title="Custom range" />
<Dropdown.MenuWrapper flex>
<Dropdown.Menu style={{ flex: '1 0 0' }}>
<Dropdown.MenuWrapper style={{ whiteSpace: 'nowrap' }}>
<Dropdown.Menu>
<MenuItem eventKey="1d">
Last 24 hours
</MenuItem>
Expand All @@ -33,11 +32,10 @@ export default () => (
</Dropdown.Menu>
<div
style={{
flex: '0 0 auto',
display: 'inline-block',
padding: 12,
borderLeft: '1px solid #ddd',
height: 200
width: 400
}}
>
<p>Specify a date/time range.</p>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@trendmicro/react-dropdown",
"version": "1.2.1",
"version": "1.2.2",
"description": "React Dropdown component",
"main": "lib/index.js",
"files": [
Expand Down
8 changes: 1 addition & 7 deletions src/DropdownMenuWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class DropdownMenuWrapper extends PureComponent {
PropTypes.func
]),

flex: PropTypes.bool,

// Dropdown
open: PropTypes.bool,
pullRight: PropTypes.bool,
Expand All @@ -34,8 +32,6 @@ class DropdownMenuWrapper extends PureComponent {
static defaultProps = {
componentClass: 'div',

flex: false,

// Dropdown
open: false,
pullRight: false
Expand Down Expand Up @@ -76,7 +72,6 @@ class DropdownMenuWrapper extends PureComponent {
const {
componentType, // eslint-disable-line
componentClass: Component,
flex,
open,
pullRight,
onClose,
Expand All @@ -96,8 +91,7 @@ class DropdownMenuWrapper extends PureComponent {
<Component
{...props}
className={cx(className, {
[styles.dropdownMenuWrapper]: true,
[styles.flex]: !!flex
[styles.dropdownMenuWrapper]: true
})}
>
{React.Children.map(children, child => {
Expand Down
5 changes: 1 addition & 4 deletions src/dropdown-menu-wrapper.styl
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@

.dropdown-menu-wrapper > .dropdown-menu {
position: static;
vertical-align: top;
}

.dropdown.open > .dropdown-menu-wrapper {
display: block;
}

.dropdown.open > .dropdown-menu-wrapper.flex {
display: flex;
}

.dropdown.open > .dropdown-menu-wrapper > .dropdown-menu {
display: inline-block;
border: 0;
Expand Down
1 change: 0 additions & 1 deletion src/dropdown-menu.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 0;
padding: 8px 0;
margin: 0;
Expand Down

0 comments on commit a264f4d

Please sign in to comment.