Skip to main content
Glama
SearchExportDialog.tsx1.52 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { Box, Button, Modal, Text } from '@mantine/core'; import type { JSX } from 'react'; interface SearchExportDialogProps { readonly visible: boolean; readonly exportCsv?: () => void; readonly exportTransactionBundle?: () => void; readonly onCancel: () => void; } export function SearchExportDialog(props: SearchExportDialogProps): JSX.Element | null { return ( <Modal title="Export" closeButtonProps={{ 'aria-label': 'Close' }} opened={props.visible} onClose={props.onCancel}> <Box display="flex" style={{ justifyContent: 'space-between' }}> {props.exportCsv && <ExportButton text="CSV" exportLogic={props.exportCsv} onCancel={props.onCancel} />} {props.exportTransactionBundle && ( <ExportButton text="Transaction Bundle" exportLogic={props.exportTransactionBundle} onCancel={props.onCancel} /> )} </Box> <Text style={{ marginTop: '10px', marginLeft: '2px' }}>Limited to 1000 records</Text> </Modal> ); } interface ExportButtonProps { readonly text: string; readonly exportLogic: () => void; readonly onCancel: () => void; } export function ExportButton(props: ExportButtonProps): JSX.Element { return ( <Button onClick={() => { props.exportLogic(); props.onCancel(); }} > {`Export as ${props.text}`} </Button> ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server