| 1 |
import { Popover } from '@patternfly/react-core'; |
| 2 |
|
| 3 |
export const PopoverSelectorRef: React.FunctionComponent = () => ( |
| 4 |
<div style={{ margin: '50px' }}> |
| 5 |
<button id="popover-selector">Popover attached via selector ref</button> |
| 6 |
<Popover |
| 7 |
aria-label="Popover with selector reference example" |
| 8 |
headerContent={<div>Popover header</div>} |
| 9 |
bodyContent={ |
| 10 |
<div> |
| 11 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id feugiat augue, nec fringilla turpis. |
| 12 |
</div> |
| 13 |
} |
| 14 |
footerContent="Popover footer" |
| 15 |
triggerRef={() => document.getElementById('popover-selector') as HTMLButtonElement} |
| 16 |
/> |
| 17 |
</div> |
| 18 |
); |