Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: PresetComponentLocalStorage

Class for working with the preset components in the local storage.

Constructors​

Constructor​

new PresetComponentLocalStorage(presetsKey?): PresetComponentLocalStorage

Creates an instance of preset storage in local storage.

Parameters​

presetsKey?​

string = 'presetComponents'

the key for the preset components in the local storage.

Returns​

PresetComponentLocalStorage

Methods​

loadPresets()​

loadPresets(): PresetComponent[]

Loads the preset components from the local storage.

Returns​

PresetComponent[]

the preset components.


removePreset()​

removePreset(name): void

Removes the preset component from the local storage.

Parameters​

name​

string

the name of the preset component.

Returns​

void


savePreset()​

savePreset(preset): void

Saves the preset component to the local storage.

Parameters​

preset​

PresetComponent

the preset component to save.

Returns​

void