Skip to content

Instantly share code, notes, and snippets.

@treecy
Last active November 1, 2018 02:42
Show Gist options
  • Save treecy/a4c88f796facf361dded27cce2bb1199 to your computer and use it in GitHub Desktop.
Save treecy/a4c88f796facf361dded27cce2bb1199 to your computer and use it in GitHub Desktop.
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