@odx/assets-utils
The @odx/assets-utils
library provides utility functions and classes for managing and rendering assets in the ODX ecosystem.
Installation
To install the library, use npm or yarn:
npm install @odx/assets-utils
Usage
Importing the Library
To use the utilities provided by @odx/assets-utils
, import the necessary functions or classes:
import { OdxAssetElement } from '@odx/assets-utils/element';
Example
Here's an example of how to create a custom asset element:
import { OdxAssetElement, registerAssetElement } from '@odx/assets-utils/element';
class CustomAssetElement extends OdxAssetElement {
readonly namespace = 'custom';
readonly defaultSet = 'default';
}
registerAssetElement('custom-asset', CustomAssetElement);