ResourceOpenWith

The viewers that can open this resource, for the reader to choose.

import { ResourceOpenWith } from '@textui/documents';

<ResourceOpenWith resource={null} onChoose={(viewer) => console.log(viewer.id)} />

Props

| Prop | Type | Default | | | — | — | — | — | | resource | Resource \| null | required | | | onChoose | (viewer: ResourceViewerDefinition) => void | | |

Plus everything on BoxProps.

More than one viewer can claim a kind - JSON opens in a syntax-highlighted view or a collapsible tree, and neither is always right. This lists the candidates; pass the chosen id back as ResourceView’s viewerId.

See also


Back to top

MIT licensed. Pre-1.0 - the surface is still moving.