import * as React from 'react'; import { DefaultButton, PrimaryButton } from '@fluentui/react/lib/Button'; import { Dialog, DialogType, DialogFooter } from '@fluentui/react/lib/Dialog'; import { Panel, PanelType } from '@fluentui/react/lib/Panel'; import { useBoolean } from '@fluentui/react-hooks'; const dialogContentProps = { type: DialogType.normal, title: 'This dialog also makes use of FocusTrapZone. Focus should be trapped in the dialog.', subText: "Focus will move back to the panel if you press 'OK' or 'Cancel'.", }; const modelProps = { titleAriaId: 'myLabelId', subtitleAriaId: 'mySubTextId', isBlocking: false, styles: { main: { maxWidth: 450 } }, }; export const FocusTrapZoneDialogInPanelExample: React.FunctionComponent = () => { const [showPanel, { toggle: toggleShowPanel }] = useBoolean(false); const [hideDialog, { toggle: toggleHideDialog }] = useBoolean(true); return (
); };