File tree Expand file tree Collapse file tree 8 files changed +76
-0
lines changed Expand file tree Collapse file tree 8 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ import './App.css' ;
2+ import Basic from './com/basic/index.js' ;
3+
4+ function App ( ) {
5+ return (
6+ < Basic > </ Basic >
7+ ) ;
8+ }
9+
10+ export default App ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ export default function ( props ) {
3+ return (
4+ < p >
5+ { 'eager tab content 1' }
6+ </ p >
7+ ) ;
8+ } ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ export default function ( props ) {
3+ return (
4+ < p >
5+ { 'eager tab content 2' }
6+ </ p >
7+ ) ;
8+ } ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ //import useDynTabs from 'react-dyn-tabs/dist/react-dyn-tabs.umd.js';
3+ import useDynTabs from 'react-dyn-tabs' ;
4+ import service from './service/index.js' ;
5+ import './index.css' ;
6+ export default function ( props ) {
7+ const options = service . getLocalData ( ) ;
8+ const [ Tablist , Panellist , api ] = useDynTabs ( options ) ;
9+ return (
10+ < >
11+ < Tablist > </ Tablist >
12+ < Panellist > </ Panellist >
13+ </ >
14+ ) ;
15+ } ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import MockPanel1 from '../com/eager/eagerPanel1.js' ;
3+ import MockPanel2 from '../com/eager/eagerPanel2.js' ;
4+ export default {
5+ getLocalData : function ( ) {
6+ return {
7+ tabs : [ {
8+ id : '1' ,
9+ title : 'mock tab 1' ,
10+ closable : true ,
11+ panelComponent : < MockPanel1 > </ MockPanel1 >
12+ } , {
13+ id : '2' ,
14+ title : 'mock tab 2' ,
15+ iconClass : 'ui-icon ui-icon-seek-end' ,
16+ closable : true ,
17+ panelComponent : < MockPanel2 > </ MockPanel2 >
18+ } ] ,
19+ selectedTabID : '1' ,
20+ onSelect : ( switchTabsId , api ) => {
21+ }
22+ } ;
23+ }
24+ } ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import ReactDOM from 'react-dom' ;
3+ import App from './App.js' ;
4+
5+ ReactDOM . render (
6+ < React . StrictMode >
7+ < App />
8+ </ React . StrictMode > ,
9+ document . getElementById ( 'root' )
10+ ) ;
11+
You can’t perform that action at this time.
0 commit comments