All JavaScript helpers can be imported from the @eightshift/frontend-libs/scripts
folder, so you don't need to think about the internal folder structure of Eightshift Frontend Libs. If you want multiple functions imported just concatenate them in the import like this:
import {
camelize,
checkAttr,
props,
...
} from '@eightshift/frontend-libs/scripts';
Editor helpers
All of these helpers are generally only used in the Block Editor.
icons
All UI icons.
illustrations
Illustrations for helper modals.
blockIcons
Block icons, primarily used in block manifests.
getActions
Create attributes actions from blocks manifest.json. This helper is deprecated and should not be used anymore.
getOption
Provides ability to override component options from the parent block/component.
getOptionColors
Use this hook to filter the global colors out of the component or block manifest. This function is deprecated and getOption should be used.
getOptions
Combines two objects of options, one from current component and the other from the parent component.
getPaletteColors
Use this hook to read editor-color-palette colors directly from WP built in store.
inserter
Development inserter made to insert one or multiple blocks in the dom using console.