UNPKG

@shopify/app-bridge

Version:

**Shopify is doubling our engineering staff in 2021! [Join our team and work on libraries like this one.](https://smrtr.io/5GGrc)**

55 lines (54 loc) 1.15 kB
import { ClientApplication } from '../../client'; import { ComplexDispatch, MetaAction } from '../types'; import { ActionSet } from '../helper'; /** * Types */ /** * @public */ export declare enum Action { SHOW = "APP::SHARE::SHOW", CLOSE = "APP::SHARE::CLOSE" } /** * @public */ export interface TextPayload { text: string; } export interface UrlPayload { url: string; } export declare type InputPayload = TextPayload | UrlPayload; /** * @public */ export interface OutputPayload { success: boolean; } /** * Action */ /** * A set of actions for displaying a Share Sheet component * @public */ export declare class Share extends ActionSet implements ComplexDispatch<InputPayload> { constructor(app: ClientApplication<any>); /** * @public */ dispatch(action: Action.SHOW, payload: InputPayload): Share; /** * @internal */ private dispatchShareAction; } /** * @public */ export declare function create(app: ClientApplication<any>): Share; export declare type ShareAction = MetaAction; export declare function show(): ShareAction; export declare function close(): ShareAction;