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