import * as React from 'react'; import { DefaultButton, FocusTrapCallout, Stack, FocusZone, PrimaryButton, mergeStyleSets, FontWeights, Text, } from 'office-ui-fabric-react'; import { useBoolean } from '@uifabric/react-hooks'; const styles = mergeStyleSets({ buttonArea: { verticalAlign: 'top', display: 'inline-block', textAlign: 'center', margin: '0 100px', minWidth: 130, height: 32, }, callout: { maxWidth: 300, }, header: { padding: '18px 24px 12px', }, title: [ { margin: 0, fontWeight: FontWeights.semilight, }, ], inner: { height: '100%', padding: '0 24px 20px', }, actions: { position: 'relative', marginTop: 20, width: '100%', whiteSpace: 'nowrap', }, buttons: { display: 'flex', justifyContent: 'flex-end', padding: '0 24px 24px', }, subtext: [ { margin: 0, fontWeight: FontWeights.semilight, }, ], }); export const CalloutFocusTrapExample: React.FunctionComponent = () => { const [isCalloutVisible, { toggle: toggleIsCalloutVisible }] = useBoolean(false); return ( <>