Merge branch 'master' into localhost-context-menu

pull/1747/head
David Disu 3 years ago committed by GitHub
commit a6d3bf4554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      apps/remix-ide/src/app/panels/tab-proxy.js
  2. 2
      apps/remix-ide/src/assets/js/react-tabs.production.min.js
  3. 6
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -306,8 +306,13 @@ export class TabProxy extends Plugin {
}
renderTabsbar () {
window.React = React
const script = document.createElement('script')
script.type = 'text/javascript'
script.src = 'assets/js/react-tabs.production.min.js'
document.head.appendChild(script)
script.addEventListener('load', () => this.renderComponent())
this.el = document.createElement('div')
this.renderComponent()
return this.el
}
}

File diff suppressed because one or more lines are too long

@ -1,6 +1,5 @@
import React, { useState, useRef, useEffect, useReducer } from 'react' // eslint-disable-line
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'
// import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'
import './remix-ui-tabs.css'
/* eslint-disable-next-line */
@ -18,7 +17,10 @@ export interface TabsUIApi {
active: () => string
}
declare var ReactTabs: any
export const TabsUI = (props: TabsUIProps) => {
const { Tab, Tabs, TabList, TabPanel } = ReactTabs
const [selectedIndex, setSelectedIndex] = useState(-1)
const currentIndexRef = useRef(-1)
const tabsRef = useRef({})

Loading…
Cancel
Save