Skip to main content

Interface: IMyopComponentProps<TDataType, TPayloads>

Defined in: types.ts:57

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: types.ts:64

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: types.ts:62

Initialize the component with data

Parameters​

data​

TDataType

Returns​

void