node/@patternfly/react-core/src/components/Popover/examples/PopoverWidthAuto.tsx
raw| 1 | import { Popover, Button } from '@patternfly/react-core'; |
| 2 | |
| 3 | export const PopoverWidthAuto: React.FunctionComponent = () => ( |
| 4 | <div style={{ margin: '50px' }}> |
| 5 | <Popover |
| 6 | aria-label="Popover with auto-width" |
| 7 | hasAutoWidth |
| 8 | bodyContent={() => <div>Removes fixed-width and allows width to be defined by contents</div>} |
| 9 | appendTo={() => document.body} |
| 10 | > |
| 11 | <Button>Toggle popover</Button> |
| 12 | </Popover> |
| 13 | </div> |
| 14 | ); |