Skip to main content

Interface: IMyopComponentProps<TDataType, TPayloads>

Defined in: src/types.ts:55

Typed props interface for accessing component.props with autocomplete. Contains myop_init_interface and myop_cta_handler with proper types.

Type Parameters

TDataType = any

TPayloads extends Record<string, any> = Record<string, any>

Properties

myop_cta_handler()?

optional myop_cta_handler: <K>(action, payload) => void

Defined in: src/types.ts:62

Handle CTA events from the component

Type Parameters

K extends string | number | symbol

Parameters

action

K

payload

TPayloads[K]

Returns

void


myop_init_interface()?

optional myop_init_interface: (data) => void

Defined in: src/types.ts:60

Initialize the component with data

Parameters

data

TDataType

Returns

void