github.com/replicatedhq/ship@v0.55.0/web/init/src/components/shared/Popover.jsx (about) 1 import * as React from "react"; 2 3 export default class Popover extends React.Component { 4 render() { 5 const { 6 className, 7 visible, 8 text, 9 content, 10 position, 11 onClick, 12 minWidth, 13 } = this.props; 14 15 const wrapperClass = `Popover-wrapper popover-${position || ""} ${className || ""} ${visible ? "is-active" : ""}`; 16 17 return ( 18 <div className={wrapperClass} style={{ minWidth: `${minWidth}px` }} onClick={onClick}> 19 <div className="Popover-content"> 20 {content || text} 21 </div> 22 </div> 23 ); 24 } 25 }