import { Panel, PanelType, ChoiceGroup } from "office-ui-fabric-react"; import * as React from "react"; import { useDirectories } from "../../../hooks/useDirectories"; interface Props { isOpen: boolean; dismissPanel: () => void; tenantId: string; armToken: string; switchTenant: (tenantId: string) => void; } export const DirectoryPickerPanel: React.FunctionComponent = ({ isOpen, dismissPanel, armToken, tenantId, switchTenant, }: Props) => { const directories = useDirectories(armToken); return ( ({ key: dir.tenantId, text: `${dir.displayName} (${dir.tenantId})` }))} selectedKey={tenantId} onChange={(event, option) => { switchTenant(option.key); dismissPanel(); }} /> ); };