@ideascloud/react-setup-editor-resources
v0.13.0
Published
Import ```javascript import { ICSetupEditorResourcesProvider, icSetupEditorResourcesContext, CodeHelpResourcesBox, } from 'ic-setup-editor-react-resources' ```
Downloads
7
Readme
Setup
Import
import {
ICSetupEditorResourcesProvider,
icSetupEditorResourcesContext,
CodeHelpResourcesBox,
} from 'ic-setup-editor-react-resources'
Setup provider
<ICSetupEditorResourcesProvider
projectId='60a809692e1d65000864ac4a'
accessToken='88GI9Djg1chbbhNUVK7JHTORUIKdtIobcly98fPle1YhvboiYLlogUefeurn'
>
..
</ICSetupEditorResourcesProvider>
Context resources
const { customWebapps, webappTemplates } = useContext(icSetupEditorResourcesContext);
Helper usage
<CodeHelpResourcesBox
currentContext={{
projectSetup: projectSetup,
itemsTypeKey: 'services',
attribute: 'pipeline',
value: {}
}}
onItemChange={(itemChanged) => {
console.log('itemChanged =>', itemChanged);
}}
/>