Skip to main content
Glama
ArrayAddButton.tsx1.03 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { ActionIcon, Button } from '@mantine/core'; import { IconCirclePlus } from '@tabler/icons-react'; import type { JSX, MouseEventHandler } from 'react'; export interface ArrayAddButtonProps { readonly propertyDisplayName?: string; readonly onClick: MouseEventHandler; readonly testId?: string; } export function ArrayAddButton({ propertyDisplayName, onClick, testId }: ArrayAddButtonProps): JSX.Element { const text = propertyDisplayName ? `Add ${propertyDisplayName}` : 'Add'; return propertyDisplayName ? ( <Button title={text} size="sm" color="green.6" variant="subtle" data-testid={testId} leftSection={<IconCirclePlus size="1.25rem" />} onClick={onClick} > {text} </Button> ) : ( <ActionIcon title={text} color="green.6" data-testid={testId} onClick={onClick}> <IconCirclePlus size="1.25rem" /> </ActionIcon> ); }

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