material-ui-popup-state
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -111,3 +111,3 @@ import * as React from 'react'; | ||
return children({ | ||
const result = children({ | ||
open: this.handleOpen, | ||
@@ -122,2 +122,4 @@ close: this.handleClose, | ||
}); | ||
if (result == null) return null; | ||
return result; | ||
} | ||
@@ -124,0 +126,0 @@ } |
@@ -193,3 +193,3 @@ 'use strict'; | ||
return children({ | ||
var result = children({ | ||
open: this.handleOpen, | ||
@@ -204,2 +204,4 @@ close: this.handleClose, | ||
}); | ||
if (result == null) return null; | ||
return result; | ||
} | ||
@@ -206,0 +208,0 @@ }]); |
{ | ||
"name": "material-ui-popup-state", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "easiest way to create menus, popovers, and poppers with material-ui", | ||
@@ -98,3 +98,3 @@ "main": "index.js", | ||
"eslint-watch": "^3.0.0", | ||
"flow-bin": "^0.78.0", | ||
"flow-bin": "^0.87.0", | ||
"flow-copy-source": "^1.2.1", | ||
@@ -101,0 +101,0 @@ "flow-watch": "^1.1.0", |
@@ -43,6 +43,6 @@ # material-ui-popup-state | ||
import MenuItem from '@material-ui/core/MenuItem' | ||
import PopupState, { bindTrigger, bindMenu } from '@material-ui/core/PopupState' | ||
import PopupState, { bindTrigger, bindMenu } from 'material-ui-popup-state' | ||
const MenuPopupState = () => ( | ||
<PopupState popupId="demoMenu"> | ||
<PopupState variant="popover" popupId="demoMenu"> | ||
{popupState => ( | ||
@@ -53,5 +53,5 @@ <React.Fragment> | ||
</Button> | ||
<Menu {...bindMenu(popupState.close)}> | ||
<MenuItem onClick={close}>Cake</MenuItem> | ||
<MenuItem onClick={close}>Death</MenuItem> | ||
<Menu {...bindMenu(popupState)}> | ||
<MenuItem onClick={popupState.close}>Cake</MenuItem> | ||
<MenuItem onClick={popupState.close}>Death</MenuItem> | ||
</Menu> | ||
@@ -75,3 +75,3 @@ </React.Fragment> | ||
import Popover from '@material-ui/core/Popover' | ||
import PopupState, { bindTrigger, bindPopover } from '@material-ui/core/PopupState' | ||
import PopupState, { bindTrigger, bindPopover } from 'material-ui-popup-state' | ||
@@ -85,3 +85,3 @@ const styles = theme => ({ | ||
const PopoverPopupState = ({ classes }) => ( | ||
<PopupState popupId="demoPopover"> | ||
<PopupState variant="popover" popupId="demoPopover"> | ||
{popupState => ( | ||
@@ -125,3 +125,3 @@ <div> | ||
import Popover from '@material-ui/core/Popover' | ||
import PopupState, { bindHover, bindPopover } from '@material-ui/core/PopupState' | ||
import PopupState, { bindHover, bindPopover } from 'material-ui-popup-state' | ||
@@ -138,3 +138,3 @@ const styles = theme => ({ | ||
const HoverPopoverPopupState = ({ classes }) => ( | ||
<PopupState popupId="demoPopover"> | ||
<PopupState variant="popover" popupId="demoPopover"> | ||
{popupState => ( | ||
@@ -182,3 +182,3 @@ <div> | ||
import Popper from '@material-ui/core/Popper' | ||
import PopupState, { bindToggle, bindPopper } from '@material-ui/core/PopupState' | ||
import PopupState, { bindToggle, bindPopper } from 'material-ui-popup-state' | ||
import Fade from '@material-ui/core/Fade' | ||
@@ -194,3 +194,3 @@ import Paper from '@material-ui/core/Paper' | ||
const PopperPopupState = ({ classes }) => ( | ||
<PopupState popupId="demoPopper"> | ||
<PopupState variant="popper" popupId="demoPopper"> | ||
{popupState => ( | ||
@@ -197,0 +197,0 @@ <div> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
283642
348