Utilização

Handle the outcome of a share sheet.

tsx
// Handle the outcome of a share sheet.
import { share, type ShareAction } from 'kuito';

const outcomes: Record<ShareAction, string> = { shared: 'Thanks for sharing', dismissed: '' };

const { action } = await share({ message: 'Listen to this', url: 'https://example.com/a/42' });

console.log(outcomes[action]);

Declaração do tipo

ts
export type ShareAction = SpecShareAction;

Tipo

ts
"shared" | "dismissed"
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.