UNPKG

@flows/react-components

Version:

Built-in components for Flows React SDK

37 lines (34 loc) 1.19 kB
/** * Properties provided by Flows based on block and block template setup. */ interface FlowsProperties { /** * Unique identifier of the block, useful for stable key during rendering. Keep in mind each workflow version will have a different id for each block. */ id: string; /** * User defined key for identifying the block. */ key?: string; /** * Id of the workflow this block belongs to. */ workflowId: string; } type ComponentProps<T extends Record<string, any> = any> = { /** * Properties provided by Flows based on block and block template setup. */ __flows: FlowsProperties; } & T; type TourComponentProps<T extends Record<string, any> = any> = { /** * Properties provided by Flows based on block and block template setup. */ __flows: FlowsProperties; continue: () => void; previous?: () => void; cancel: () => void; } & T; type Placement = "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"; export type { ComponentProps as C, Placement as P, TourComponentProps as T };