Skip to main content
Glama
AttachmentButton.stories.tsx1.18 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { ActionIcon, Button } from '@mantine/core'; import type { Meta } from '@storybook/react'; import { IconCloudUpload } from '@tabler/icons-react'; import type { JSX } from 'react'; import { Document } from '../Document/Document'; import { AttachmentButton } from './AttachmentButton'; export default { title: 'Medplum/AttachmentButton', component: AttachmentButton, } as Meta; export const Example = (): JSX.Element => ( <Document> <AttachmentButton onUpload={console.log}>{(props) => <Button {...props}>Upload</Button>}</AttachmentButton> </Document> ); export const CustomText = (): JSX.Element => ( <Document> <AttachmentButton onUpload={console.log}>{(props) => <Button {...props}>My text</Button>}</AttachmentButton> </Document> ); export const CustomComponent = (): JSX.Element => ( <Document> <AttachmentButton onUpload={console.log}> {(props) => ( <ActionIcon {...props} variant="filled"> <IconCloudUpload size={16} /> </ActionIcon> )} </AttachmentButton> </Document> );

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