Verwendung

Share a message or file

Dieser Typ wird verwendet von share

tsx
import { share } from 'kuito';

const result = await share(
  { message: 'Severance', url: 'https://www.tvmaze.com/shows/44933', title: 'A show' },
  { dialogTitle: 'Share a show', subject: 'Watch this' },
);

if (result.action === 'shared') console.log('shared with', result.activityType);

Typdeklaration

ts
export type ShareOptions = {
  /** Android: the chooser's title. */
  dialogTitle?: string;
  /** iOS: the subject, as an email's. */
  subject?: string;
  /** iOS: activity types to leave out, as `com.apple.UIKit.activity.AirDrop`. */
  excludedActivityTypes?: string[];
};

Mitglieder 3

NameTypErforderlichBeschreibung
dialogTitlestringNeinAndroid: the chooser's title.
subjectstringNeiniOS: the subject, as an email's.
excludedActivityTypesstring[]NeiniOS: activity types to leave out, as com.apple.UIKit.activity.AirDrop.
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.