@hmiproject/helio-sdk
    Preparing search index...

    Type Alias CreateActionOptions<Schema>

    type CreateActionOptions<Schema extends PropsSchema> = {
        category?: string;
        description?: string;
        icon?: IconRef;
        id?: string;
        name: string;
        propsSchema: Schema;
        useAction: (
            props: CurrentSchemaValues<Schema>,
        ) => CreateActionUseActionResult;
    }

    Type Parameters

    Index

    Properties

    category?: string

    Optional category for grouping this action in the HELIO IDE, such as in the Add Element dialog.

    description?: string

    Description of this action that will appear in the IDE.

    icon?: IconRef

    Optional icon to identify this action in the HELIO IDE.

    { name: 'Dinosaur' }
    
    id?: string

    Internal ID of the action. This uniquely identifies the action within the extension and should never change. If this property is omitted, the action will be referenced by its name.

    name: string

    Human-readable name of the action as it will appear in the HELIO IDE.

    Note: If no explicit id is provided, this value will also be used to create a unique id for the action.

    Changing the name in an extension update will break action references in existing projects.

    If you need to change the name, make sure to provide an id with the old name to ensure a smooth migration.

    Migrating action name.

    {
    name: 'New Action Name',
    id: 'Old Action Name',
    // ...other `createAction` options...
    }
    propsSchema: Schema

    Schema containing the properties this action accepts, created using the createPropsSchema function.

    useAction: (props: CurrentSchemaValues<Schema>) => CreateActionUseActionResult

    Implementation of this action property.

    Will be dynamically installed by HELIO as a React hook to allow for data subscription and other scenarios where data changes over time.