Skip to main content

Interface: IMyopComponentProps<TData, TCtaPayloads>

Defined in: lib/myop.component.ts:89

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

Type Parameters​

• TData = any

• TCtaPayloads extends Record<string, any> = Record<string, any>

Properties​

myop_cta_handler()?​

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

Defined in: lib/myop.component.ts:96

Handle CTA events from the component

Type Parameters​

• K extends string | number | symbol

Parameters​

action​

K

payload​

TCtaPayloads[K]

Returns​

void


myop_init_interface()?​

optional myop_init_interface: (data) => void

Defined in: lib/myop.component.ts:94

Initialize the component with data

Parameters​

data​

TData

Returns​

void