The wrapper for [@pyramid-embed/embed-js](https://www.npmjs.com/package/@pyramid-embed/embed-js)
npm install @pyramid-embed/embed-reactbash
yarn add @pyramid-embed/embed-react
`
`bash
npm i @pyramid-embed/embed-react
`
API documentation
Please check online help for the general documentation.
Usage
`javascript
import { PyramidEmbedContainer } from '@pyramid-embed/embed-react';
`
`javascript
`
$3
- host: string - URL of the Pyramid instance
- options: EmbedOptions - embed options
- loginType?: "none" | "forms" | "windows" | "saml" - authentication type
- userName?: string - username, used when loginType="forms"
- password?: string - password, used when loginType="forms"
- authToken?: string - Pyramid authentication token
- samlToken?: string - SAML token
- style?: object - apply styles to the container element
- className?: string - apply a className to the container element
- authFailureCallback?: Function - a function that will be called when the embed token has expired
Examples
$3
##### The code example uses existing embed auth cookie.
`javascript
const embedOptions = {
contentId: 'f5366b40-fbc7-4773-8180-7759bb0760df'
}
host="http://pyramid:8181"
options={embedOptions}
style={{width: 1280, height: 720}}
/>
`
$3
`javascript
const embedOptions = {
contentId: 'f5366b40-fbc7-4773-8180-7759bb0760df'
}
host="http://pyramid:8181"
options={embedOptions}
loginType="windows"
style={{width: 1280, height: 720}}
/>
`
$3
##### The code example uses existing embed auth cookie.
`javascript
import { PyramidEmbedContainer, Filter } from '@pyramid-embed/embed-react';
const filter = Filter.create().addUniqueName('[customer].[country].[France]');
const embedOptions = {
contentId: 'f5366b40-fbc7-4773-8180-7759bb0760df',
filters: filter
}
host="http://pyramid:8181"
options={embedOptions}
style={{width: 1280, height: 720}}
/>
``