How to use the zoid/dist/zoid.frame.create function in zoid

To help you get started, we’ve selected a few zoid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TheIdentitySelector / thiss-js / src / component.js View on Github external
/*
    event.on('zoid-resize', ({ width: newWidth, height: newHeight }) => {
        if (typeof newWidth === 'number') {
            div.style.width = toCSS(newWidth);
        }

        if (typeof newHeight === 'number') {
            div.style.height = toCSS(newHeight);
        }
    });
     */

    return div;
}

export const DiscoveryComponent = zoid.create({

    // The html tag used to render my component
    tag: 'thiss-cta',

    url: process.env.COMPONENT_URL,

    defaultEnv: 'thiss',

    // default dimensions for the component
    dimensions: {
    	width: '350px',
    	height: '80px'
    },
    
    // defines the log level in the JavaScript console
    defaultLogLevel: process.env.LOGLEVEL,