import React from 'react';

const DIframe = (props) => {
    console.log("DIframe:",props);
    var attrs = {};
    attrs.className = props.soIframe.atts.className;
    attrs.src = props.soIframe.atts.src+="?size=" + props.soSize;
    attrs.name = "embed_square_off_" + props.soID;
    attrs.frameborder = 0;
    attrs.scrolling = "no";
    attrs.referrerpolicy = "no-referrer-when-downgrade";
	attrs.identitypolicy = "identity-credentials-get";
    // attrs.style =  props.soIframe.atts.style;

    switch(props.soSize){
        case "small":
            attrs.height = "250";
            attrs.width = "300";
            break;
        case "medium":
            attrs.height = "426.75";
            attrs.width = "300";
            break;
        case "wide":
        default:
            attrs.height = "761";
            attrs.width = "100%";
            break;

    }
    return (
        <iframe {...attrs}/>
    )
}

export default DIframe;
