Last active
November 1, 2018 02:42
-
-
Save treecy/a4c88f796facf361dded27cce2bb1199 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import cx from 'classnames'; | |
import { | |
Popover, IPopoverProps, | |
PopoverInteractionKind, | |
Position | |
} from '@blueprintjs/core'; | |
import './NotifyPopover.scss'; | |
interface IProps extends IPopoverProps{ | |
className?: string; | |
} | |
const defaultProps = { | |
interaction: PopoverInteractionKind.HOVER_TARGET_ONLY, | |
position: Position.TOP, | |
} | |
const NotifyPopover: React.SFC<IProps> = (props) => { | |
const popoverClasses = cx( | |
'notify-popover', | |
// Merge the classes passed in from props | |
{ [`${props.className}`]: props.className !== null } | |
); | |
return ( | |
<Popover {...props}> | |
{props.children} | |
</Popover> | |
); | |
}; | |
export default NotifyPopover; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment