App Widget Component
Less than 1 minute
Installation
npm install @equinor/fusion-framework-react-app
Fist one ned to enable the widget module
import { enableWidgetModule } from '@equinor/fusion-framework-react-app/widget';
export default (configurator: IAppConfigurator) => {
enableWidgetModule(configurator);
};
Widget Component
Utilizing the widget component is straightforward; only the essential "name" parameter is required.
Basic
import { Widget } from "@equinor/fusion-framework-react-app/widget"
<Widget name='my-widget-id' />
Version Select
import { Widget } from "@equinor/fusion-framework-react-app/widget"
<Widget name='my-widget-id' widgetVersion={{
type: 'version'
value: '1.0.4'
}} />
With Props
import { Widget } from "@equinor/fusion-framework-react-app/widget"
<Widget name='my-widget-id' props={{ someWidgetProp: 'Hello Widget' }} />