Usage

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]);

Type declaration

ts
export type ShareAction = SpecShareAction;

Type

ts
"shared" | "dismissed"
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.