const { apiKey } = props; let sql = `SELECT * FROM ethereum.core.fact_transactions order by block_timestamp limit 1`; const Component = ({ data, runQuery, hasError, isRunning, isLoading }) => { if (hasError) { return ( <div> <strong>Error!</strong> <button onClick={() => { runQuery(sql); }} > Click Me </button> </div> ); } return ( <div> <button onClick={() => { runQuery(sql); }} > Click Me </button> <span>{JSON.stringify(data)}</span> </div> ); }; let content = "<div>Rendering from html tag</div>"; return ( <div> <span>{sql}</span> <iframe className="w-100" style={{ height: "300px" }} srcDoc={content} /> <Widget src="kida.near/widget/Untitled-0" props={{ apiKey, component: Component, sql }} /> </div> );