update abstract and side panels

pull/5370/head
David Zagi 3 years ago committed by yann300
parent 1e80afd3c8
commit 6a110248d9
  1. 1
      apps/remix-ide/src/app.js
  2. 2
      apps/remix-ide/src/app/components/panel.js
  3. 3
      apps/remix-ide/src/app/components/side-panel.js
  4. 11
      libs/remix-ui/side-panel/src/lib/remix-ui-side-panel.tsx

@ -91,7 +91,6 @@ const css = csjs`
flex-direction : row-reverse; flex-direction : row-reverse;
width : 320px; width : 320px;
overflow : auto; overflow : auto;
padding-bottom: 20px;
} }
.highlightcode { .highlightcode {
position : absolute; position : absolute;

@ -55,10 +55,8 @@ export class AbstractPanel extends HostPlugin {
if (!this.contents[name]) throw new Error(`Plugin ${name} is not yet activated`) if (!this.contents[name]) throw new Error(`Plugin ${name} is not yet activated`)
// hiding the current view and display the `moduleName` // hiding the current view and display the `moduleName`
if (this.active) { if (this.active) {
console.log({ active: this.active, name }, 'first')
this.contents[this.active].style.display = 'none' this.contents[this.active].style.display = 'none'
} }
console.log({ active: this.active, name }, 'second')
this.contents[name].style.display = 'flex' this.contents[name].style.display = 'flex'
this.active = name this.active = name
this.renderComponent() this.renderComponent()

@ -2,10 +2,8 @@ import React from 'react' // eslint-disable-line
import { AbstractPanel } from './panel' import { AbstractPanel } from './panel'
import ReactDOM from 'react-dom' // eslint-disable-line import ReactDOM from 'react-dom' // eslint-disable-line
import { RemixUiSidePanel } from '@remix-ui/side-panel' // eslint-disable-line import { RemixUiSidePanel } from '@remix-ui/side-panel' // eslint-disable-line
import { RemixUiAbstractPanel } from '@remix-ui/abstract-panel'
import * as packageJson from '../../../../../package.json' import * as packageJson from '../../../../../package.json'
// const csjs = require('csjs-inject') // const csjs = require('csjs-inject')
const yo = require('yo-yo')
const sidePanel = { const sidePanel = {
name: 'sidePanel', name: 'sidePanel',
@ -20,7 +18,6 @@ export class SidePanel extends AbstractPanel {
constructor (appManager, verticalIcons) { constructor (appManager, verticalIcons) {
super(sidePanel) super(sidePanel)
this.appManager = appManager this.appManager = appManager
this.header = yo`<header></header>`
this.sideelement = this.element this.sideelement = this.element
// this.sideelement.setAttribute('class', 'panel') // this.sideelement.setAttribute('class', 'panel')
this.verticalIcons = verticalIcons this.verticalIcons = verticalIcons

@ -46,9 +46,14 @@ export function RemixUiSidePanel(props: RemixUiSidePanelProps) {
return ( return (
<header style={{ <header style={{
display: 'flex', display: 'flex',
alignItems: 'center', flexDirection: 'column',
padding: '16px 24px 15px', alignItems: 'center',
justifyContent: 'space-between' padding: '10px',
position: 'sticky',
top: 0,
zIndex: 2,
marginBottom: '0px',
boxSizing: 'inherit',
}}> }}>
<h6 className="swapitTitle" data-id="sidePanelSwapitTitle">{name}</h6> <h6 className="swapitTitle" data-id="sidePanelSwapitTitle">{name}</h6>
{dockLink ? (<a href={profileDocsLink} className="titleInfo" title="link to documentation" target="_blank" rel="noreferrer"><i aria-hidden="true" className="fas fa-book"></i></a>) : ''} {dockLink ? (<a href={profileDocsLink} className="titleInfo" title="link to documentation" target="_blank" rel="noreferrer"><i aria-hidden="true" className="fas fa-book"></i></a>) : ''}

Loading…
Cancel
Save