Skip to content

Commit 759412e

Browse files
committed
replace jsxTab with tsxTab
1 parent 5ba8cbc commit 759412e

20 files changed

Lines changed: 46 additions & 46 deletions

example/adv-save-layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {htmlTab, jsxTab} from "./prism-tabs";
4+
import {htmlTab, tsxTab} from "./prism-tabs";
55
import {DockLayout, TabBase, TabData, PanelBase, PanelData, LayoutBase} from '../src';
66

77
let groups = {
@@ -66,7 +66,7 @@ class Demo extends React.Component<{}, DemoState> {
6666
{
6767
id: 'main-panel',
6868
size: 400,
69-
tabs: [{id: 'tab0'}, {id: 'jsxTab'}, {id: 'htmlTab'}],
69+
tabs: [{id: 'tab0'}, {id: 'tsxTab'}, {id: 'htmlTab'}],
7070
panelLock: {
7171
panelStyle: 'main'
7272
}
@@ -92,8 +92,8 @@ class Demo extends React.Component<{}, DemoState> {
9292
switch (id) {
9393
case 'tab0':
9494
return tab0;
95-
case 'jsxTab':
96-
return jsxTab;
95+
case 'tsxTab':
96+
return tsxTab;
9797
case 'htmlTab':
9898
return htmlTab;
9999
default:

example/adv-tab-update.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {htmlTab, jsxTab} from "./prism-tabs";
4+
import {htmlTab, tsxTab} from "./prism-tabs";
55
import {DockLayout, PanelData} from '../src';
66

77
let groups = {
@@ -69,7 +69,7 @@ class Demo extends React.Component<{}, DemoState> {
6969
</div>
7070
)
7171
},
72-
jsxTab,
72+
tsxTab,
7373
htmlTab
7474
],
7575
},

example/basic.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {jsxTab, htmlTab} from './prism-tabs';
4+
import {tsxTab, htmlTab} from './prism-tabs';
55
import {DockLayout, DockContextType, DragState} from '../src';
66

77
let tab = {
@@ -42,7 +42,7 @@ let layout: any = {
4242
</div>
4343
),
4444
},
45-
jsxTab,
45+
tsxTab,
4646
htmlTab,
4747
],
4848
panelLock: {panelStyle: 'main'},

example/controlled-layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {htmlTab, jsxTab} from "./prism-tabs";
4+
import {htmlTab, tsxTab} from "./prism-tabs";
55
import {DockLayout, LayoutBase, TabBase, TabData, DropDirection} from '../src';
66

77
let tab0 = {
@@ -22,7 +22,7 @@ let box = {
2222
mode: 'vertical',
2323
children: [
2424
{
25-
tabs: [{id: 't0'}, htmlTab, jsxTab],
25+
tabs: [{id: 't0'}, htmlTab, tsxTab],
2626
},
2727
{
2828
tabs: [{id: 'protect1'}, {id: 't4'}, {id: 't5'}, {id: 't6'}],
@@ -57,8 +57,8 @@ class Demo extends React.Component<{}, DemoState> {
5757
This is done in the onLayoutChange callback
5858
</div>
5959
};
60-
case jsxTab.id:
61-
return jsxTab;
60+
case tsxTab.id:
61+
return tsxTab;
6262
case htmlTab.id:
6363
return htmlTab;
6464
}

example/dark-theme.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// The jsx is same as basic example.
1+
// The tsx is same as basic example.
22
// Only difference is in the css, just use dist/rc-dock-dark.css for dark theme.

example/disable-dock.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {jsxTab, htmlTab} from './prism-tabs';
4+
import {tsxTab, htmlTab} from './prism-tabs';
55
import {DockLayout, DockContextType} from '../src';
66

77

@@ -17,7 +17,7 @@ let layout: any = {
1717
mode: 'horizontal',
1818
children: [
1919
{
20-
tabs: [{id: 't1', title: 'Dock', content: <div>Dock Content</div>}, jsxTab, htmlTab],
20+
tabs: [{id: 't1', title: 'Dock', content: <div>Dock Content</div>}, tsxTab, htmlTab],
2121
}
2222
]
2323
},

example/divider-box.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {jsxTab, htmlTab} from './prism-tabs';
4+
import {tsxTab, htmlTab} from './prism-tabs';
55
import {DockLayout, DividerBox} from '../src';
66

77
let layoutLeft = {
@@ -28,7 +28,7 @@ let layoutRight = {
2828
id: 't3',
2929
title: 'Dock',
3030
content: <div>Right Side Dock Layout.</div>
31-
}, jsxTab, htmlTab],
31+
}, tsxTab, htmlTab],
3232
}
3333
]
3434
},

example/drag-new-tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {htmlTab, jsxTab} from "./prism-tabs";
4+
import {htmlTab, tsxTab} from "./prism-tabs";
55
import {DockLayout, DragDropDiv, DragState} from '../src';
66

77
let tab = {
@@ -16,7 +16,7 @@ let box = {
1616
mode: 'vertical',
1717
children: [
1818
{
19-
tabs: [jsxTab, htmlTab],
19+
tabs: [tsxTab, htmlTab],
2020
},
2121
{
2222
tabs: [{...tab, id: 't4'}, {...tab, id: 't5'}, {...tab, id: 't6'}],

example/drop-mode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {htmlTab, jsxTab} from "./prism-tabs";
4+
import {htmlTab, tsxTab} from "./prism-tabs";
55
import {DockLayout} from '../src';
66

77
let dropModeTab = {
@@ -26,7 +26,7 @@ let box = {
2626
mode: 'vertical',
2727
children: [
2828
{
29-
tabs: [{...dropModeTab, id: 't1'}, jsxTab, htmlTab],
29+
tabs: [{...dropModeTab, id: 't1'}, tsxTab, htmlTab],
3030
},
3131
{
3232
tabs: [{...tab, id: 't4'}, {...tab, id: 't5'}, {...tab, id: 't6'}],

example/gesture.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as ReactDOM from 'react-dom';
33
import { createRoot } from "react-dom/client";
4-
import {jsxTab} from "./prism-tabs";
4+
import {tsxTab} from "./prism-tabs";
55
import {DragDropDiv, GestureState} from '../src';
66

77
interface DemoState {
@@ -39,7 +39,7 @@ class Demo extends React.PureComponent<{}, DemoState> {
3939
dx: {dx} <br/>
4040
dy: {dy} <br/>
4141
</div>
42-
{jsxTab.content}
42+
{tsxTab.content}
4343
</div>
4444
);
4545
}

0 commit comments

Comments
 (0)