added iframe height

AbstractPanel
davidzagi93@gmail.com 3 years ago committed by yann300
parent a8bae5cc5e
commit 41162b0940
  1. 2
      apps/remix-ide/src/app/components/panel.js
  2. 9
      libs/remix-ui/side-panel/src/lib/remix-ui-side-panel.module.css
  3. 9
      libs/remix-ui/side-panel/src/lib/remix-ui-side-panel.tsx

@ -14,7 +14,6 @@ export class AbstractPanel extends HostPlugin {
this.contents = {} this.contents = {}
this.active = undefined this.active = undefined
this.element = document.createElement('div') this.element = document.createElement('div')
this.element.setAttribute('style', 'height: 100%; width: 100%; border: 0;')
} }
onActivation () { onActivation () {
@ -23,7 +22,6 @@ export class AbstractPanel extends HostPlugin {
addView (profile, view) { addView (profile, view) {
if (this.contents[profile.name]) throw new Error(`Plugin ${profile.name} already rendered`) if (this.contents[profile.name]) throw new Error(`Plugin ${profile.name} already rendered`)
// view.style.height = '90%' // makde external plugins full height
view.style.width = '100%' view.style.width = '100%'
view.style.border = '0' view.style.border = '0'
this.contents[profile.name] = view this.contents[profile.name] = view

@ -16,7 +16,7 @@
padding-left: 6px; padding-left: 6px;
font-size: 14px; font-size: 14px;
} }
.remix-ui-side-panel-swapitHeader { .swapitHeader {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 16px 24px 15px; padding: 16px 24px 15px;
@ -40,4 +40,9 @@
margin-left: 5px; margin-left: 5px;
text-transform: lowercase; text-transform: lowercase;
cursor: default; cursor: default;
} }
iframe {
height: 100%;
overflow-y: scroll;
}

@ -46,7 +46,7 @@ export function RemixUiSidePanel(props: RemixUiSidePanelProps) {
const renderHeader = () => { const renderHeader = () => {
getProfile() getProfile()
return ( return (
<header className="remix-ui-side-panel-swapitHeader" style={{ <header className="swapitHeader" style={{
display: 'flex', display: 'flex',
alignItems: "center", alignItems: "center",
padding: '16px 24px 15px', padding: '16px 24px 15px',
@ -61,13 +61,8 @@ export function RemixUiSidePanel(props: RemixUiSidePanelProps) {
return ( return (
<section> <section style={{height: "100%"}}>
{renderHeader()} {renderHeader()}
<div className="pluginsContainer" style={{
height: "100%",
overflowY: "auto"
}}>
</div>
</section> </section>
); );
} }

Loading…
Cancel
Save