-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/html/basic/index.less b/sites/x6-sites/src/tutorial/intermediate/html/basic/index.less
index f4a1d10d9ed..623125a77b3 100644
--- a/sites/x6-sites/src/tutorial/intermediate/html/basic/index.less
+++ b/sites/x6-sites/src/tutorial/intermediate/html/basic/index.less
@@ -1,43 +1,42 @@
-.app {
+.html-basic-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-
-.app-content {
- flex: 1;
- height: 240px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
-.custom-html {
- width: 100%;
- height: 100%;
- background: #333232;
- border-radius: 1em;
- box-shadow: 0 0.125em 0.3125em rgb(0 0 0 / 25%),
- 0 0.02125em 0.06125em rgb(0 0 0 / 25%);
- perspective: 600px;
+ .app-content {
+ flex: 1;
+ height: 240px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
- &::before {
- position: absolute;
- top: 50%;
- left: 0;
+ .custom-html {
width: 100%;
- height: 50%;
- background: #333232
- linear-gradient(180deg, rgb(0 0 0 / 10%) 50%, rgb(0 0 0 / 40%));
- border-radius: 0 0 1em 1em;
- transform: rotateX(180deg);
- transform-origin: center top;
- transition: 0.7s ease-in-out transform;
- content: ' ';
- }
+ height: 100%;
+ background: #333232;
+ border-radius: 1em;
+ box-shadow: 0 0.125em 0.3125em rgb(0 0 0 / 25%),
+ 0 0.02125em 0.06125em rgb(0 0 0 / 25%);
+ perspective: 600px;
+
+ &::before {
+ position: absolute;
+ top: 50%;
+ left: 0;
+ width: 100%;
+ height: 50%;
+ background: #333232
+ linear-gradient(180deg, rgb(0 0 0 / 10%) 50%, rgb(0 0 0 / 40%));
+ border-radius: 0 0 1em 1em;
+ transform: rotateX(180deg);
+ transform-origin: center top;
+ transition: 0.7s ease-in-out transform;
+ content: ' ';
+ }
- &:hover::before {
- transform: rotateX(0);
+ &:hover::before {
+ transform: rotateX(0);
+ }
}
-}
\ No newline at end of file
+}
diff --git a/sites/x6-sites/src/tutorial/intermediate/html/basic/index.tsx b/sites/x6-sites/src/tutorial/intermediate/html/basic/index.tsx
index 7c766ca8850..daf0e78dce1 100644
--- a/sites/x6-sites/src/tutorial/intermediate/html/basic/index.tsx
+++ b/sites/x6-sites/src/tutorial/intermediate/html/basic/index.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Graph, Shape } from '@antv/x6'
-import styles from './index.less'
+import './index.less'
Shape.HTML.register({
shape: 'custom-html',
@@ -9,7 +9,7 @@ Shape.HTML.register({
effect: ['data'],
html() {
const div = document.createElement('div')
- div.className = styles['custom-html']
+ div.className = 'custom-html'
return div
},
})
@@ -40,8 +40,8 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/html/update/index.less b/sites/x6-sites/src/tutorial/intermediate/html/update/index.less
index f4a1d10d9ed..a12500c5e1c 100644
--- a/sites/x6-sites/src/tutorial/intermediate/html/update/index.less
+++ b/sites/x6-sites/src/tutorial/intermediate/html/update/index.less
@@ -1,43 +1,42 @@
-.app {
+.html-update-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-
-.app-content {
- flex: 1;
- height: 240px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
-.custom-html {
- width: 100%;
- height: 100%;
- background: #333232;
- border-radius: 1em;
- box-shadow: 0 0.125em 0.3125em rgb(0 0 0 / 25%),
- 0 0.02125em 0.06125em rgb(0 0 0 / 25%);
- perspective: 600px;
+ .app-content {
+ flex: 1;
+ height: 240px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
- &::before {
- position: absolute;
- top: 50%;
- left: 0;
+ .custom-html {
width: 100%;
- height: 50%;
- background: #333232
- linear-gradient(180deg, rgb(0 0 0 / 10%) 50%, rgb(0 0 0 / 40%));
- border-radius: 0 0 1em 1em;
- transform: rotateX(180deg);
- transform-origin: center top;
- transition: 0.7s ease-in-out transform;
- content: ' ';
- }
+ height: 100%;
+ background: #333232;
+ border-radius: 1em;
+ box-shadow: 0 0.125em 0.3125em rgb(0 0 0 / 25%),
+ 0 0.02125em 0.06125em rgb(0 0 0 / 25%);
+ perspective: 600px;
+
+ &::before {
+ position: absolute;
+ top: 50%;
+ left: 0;
+ width: 100%;
+ height: 50%;
+ background: #333232
+ linear-gradient(180deg, rgb(0 0 0 / 10%) 50%, rgb(0 0 0 / 40%));
+ border-radius: 0 0 1em 1em;
+ transform: rotateX(180deg);
+ transform-origin: center top;
+ transition: 0.7s ease-in-out transform;
+ content: ' ';
+ }
- &:hover::before {
- transform: rotateX(0);
+ &:hover::before {
+ transform: rotateX(0);
+ }
}
-}
\ No newline at end of file
+}
diff --git a/sites/x6-sites/src/tutorial/intermediate/html/update/index.tsx b/sites/x6-sites/src/tutorial/intermediate/html/update/index.tsx
index 3ba4911d918..bf34ebd46b8 100644
--- a/sites/x6-sites/src/tutorial/intermediate/html/update/index.tsx
+++ b/sites/x6-sites/src/tutorial/intermediate/html/update/index.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Graph, Shape, Color } from '@antv/x6'
-import styles from './index.less'
+import './index.less'
Shape.HTML.register({
shape: 'custom-update-html',
@@ -10,7 +10,7 @@ Shape.HTML.register({
html(cell) {
const { color } = cell.getData()
const div = document.createElement('div')
- div.className = styles['custom-html']
+ div.className = 'custom-html'
div.style.background = color
return div
},
@@ -51,8 +51,8 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/react/basic/index.less b/sites/x6-sites/src/tutorial/intermediate/react/basic/index.less
index 38e20f63fb3..9b957677717 100644
--- a/sites/x6-sites/src/tutorial/intermediate/react/basic/index.less
+++ b/sites/x6-sites/src/tutorial/intermediate/react/basic/index.less
@@ -1,24 +1,23 @@
-.app {
+.react-basic-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-content {
- flex: 1;
- height: 240px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .app-content {
+ flex: 1;
+ height: 240px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-.react-node {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100%;
- border: 1px solid #8f8f8f;
- border-radius: 6px;
+ .react-node {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ border: 1px solid #8f8f8f;
+ border-radius: 6px;
+ }
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/react/basic/index.tsx b/sites/x6-sites/src/tutorial/intermediate/react/basic/index.tsx
index 62fdb254fe5..37a88c56bd9 100644
--- a/sites/x6-sites/src/tutorial/intermediate/react/basic/index.tsx
+++ b/sites/x6-sites/src/tutorial/intermediate/react/basic/index.tsx
@@ -2,11 +2,11 @@ import React from 'react'
import { Graph } from '@antv/x6'
import { register } from '@antv/x6-react-shape'
import { Progress } from 'antd'
-import styles from './index.less'
+import './index.less'
const NodeComponent = () => {
return (
-
+
)
@@ -45,8 +45,8 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/react/portal/index.less b/sites/x6-sites/src/tutorial/intermediate/react/portal/index.less
index d1632ab5034..5b3dfb7a463 100644
--- a/sites/x6-sites/src/tutorial/intermediate/react/portal/index.less
+++ b/sites/x6-sites/src/tutorial/intermediate/react/portal/index.less
@@ -1,31 +1,29 @@
-.app {
- display: flex;
- flex-direction: column;
+.react-portal-app {
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-btns {
- bottom: 0;
- padding: 0 8px;
-}
+ .app-btns {
+ bottom: 0;
+ margin: 0;
+ padding: 0 8px;
+ }
-.app-content {
- height: 240px;
- margin-top: 16px;
- margin-right: 8px;
- margin-left: 8px;
- border-radius: 5px;
- box-shadow: 0 12px 5px -10px rgb(0 0 0 / 10%), 0 0 4px 0 rgb(0 0 0 / 10%);
-}
+ .app-content {
+ width: 100%;
+ height: 240px;
+ margin: 0;
+ margin-top: 16px;
+ border-radius: 5px;
+ box-shadow: 0 12px 5px -10px rgb(0 0 0 / 10%), 0 0 4px 0 rgb(0 0 0 / 10%);
+ }
-.react-node {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100%;
- border: 1px solid #8f8f8f;
- border-radius: 6px;
+ .react-node {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ border: 1px solid #8f8f8f;
+ border-radius: 6px;
+ }
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/react/portal/index.tsx b/sites/x6-sites/src/tutorial/intermediate/react/portal/index.tsx
index 8089552e8fd..2f971ac93b0 100644
--- a/sites/x6-sites/src/tutorial/intermediate/react/portal/index.tsx
+++ b/sites/x6-sites/src/tutorial/intermediate/react/portal/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { Graph } from '@antv/x6'
import { register, Portal } from '@antv/x6-react-shape'
import { Progress, Button } from 'antd'
-import styles from './index.less'
+import './index.less'
const X6ReactPortalProvider = Portal.getProvider() // 注意,一个 graph 只能申明一个 portal provider
const ProgressContext = React.createContext(30)
@@ -10,7 +10,7 @@ const ProgressContext = React.createContext(30)
const NodeComponent = () => {
const progress = React.useContext(ProgressContext)
return (
-
+
)
@@ -59,14 +59,14 @@ export default class Example extends React.Component {
render() {
return (
-
+
-
)
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/react/update/index.less b/sites/x6-sites/src/tutorial/intermediate/react/update/index.less
index 38e20f63fb3..177e8f770c7 100644
--- a/sites/x6-sites/src/tutorial/intermediate/react/update/index.less
+++ b/sites/x6-sites/src/tutorial/intermediate/react/update/index.less
@@ -1,24 +1,23 @@
-.app {
+.react-update-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-content {
- flex: 1;
- height: 240px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .app-content {
+ flex: 1;
+ height: 240px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-.react-node {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100%;
- border: 1px solid #8f8f8f;
- border-radius: 6px;
+ .react-node {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ border: 1px solid #8f8f8f;
+ border-radius: 6px;
+ }
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/react/update/index.tsx b/sites/x6-sites/src/tutorial/intermediate/react/update/index.tsx
index 7bd2b5b1ad2..34bfa9c6a95 100644
--- a/sites/x6-sites/src/tutorial/intermediate/react/update/index.tsx
+++ b/sites/x6-sites/src/tutorial/intermediate/react/update/index.tsx
@@ -2,12 +2,12 @@ import React from 'react'
import { Graph, Node } from '@antv/x6'
import { register } from '@antv/x6-react-shape'
import { Progress } from 'antd'
-import styles from './index.less'
+import './index.less'
const NodeComponent = ({ node }: { node: Node }) => {
const { progress } = node.getData()
return (
-
+
)
@@ -57,8 +57,8 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/tools/basic/index.less b/sites/x6-sites/src/tutorial/intermediate/tools/basic/index.less
index 2b520bbc8c7..2d6a35fa198 100644
--- a/sites/x6-sites/src/tutorial/intermediate/tools/basic/index.less
+++ b/sites/x6-sites/src/tutorial/intermediate/tools/basic/index.less
@@ -1,14 +1,14 @@
-.app {
+.tools-basic-app {
display: flex;
+ width: 100%;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-content {
- flex: 1;
- height: 320px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
+ .app-content {
+ flex: 1;
+ height: 320px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/tools/basic/index.tsx b/sites/x6-sites/src/tutorial/intermediate/tools/basic/index.tsx
index c2428844e71..2b2091d309b 100644
--- a/sites/x6-sites/src/tutorial/intermediate/tools/basic/index.tsx
+++ b/sites/x6-sites/src/tutorial/intermediate/tools/basic/index.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Graph } from '@antv/x6'
-import styles from './index.less'
+import './index.less'
Graph.registerNode(
'custom-tools-node',
@@ -70,8 +70,8 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/tools/onhover/index.less b/sites/x6-sites/src/tutorial/intermediate/tools/onhover/index.less
index 2b520bbc8c7..be3a20a9acb 100644
--- a/sites/x6-sites/src/tutorial/intermediate/tools/onhover/index.less
+++ b/sites/x6-sites/src/tutorial/intermediate/tools/onhover/index.less
@@ -1,14 +1,13 @@
-.app {
+.tools-onhover-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-content {
- flex: 1;
- height: 320px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
+ .app-content {
+ flex: 1;
+ height: 320px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
}
diff --git a/sites/x6-sites/src/tutorial/intermediate/tools/onhover/index.tsx b/sites/x6-sites/src/tutorial/intermediate/tools/onhover/index.tsx
index e72165d94dd..dc3096f4e40 100644
--- a/sites/x6-sites/src/tutorial/intermediate/tools/onhover/index.tsx
+++ b/sites/x6-sites/src/tutorial/intermediate/tools/onhover/index.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Graph } from '@antv/x6'
-import styles from './index.less'
+import './index.less'
Graph.registerNode(
'custom-tools-node',
@@ -99,8 +99,8 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/clipboard/index.less b/sites/x6-sites/src/tutorial/plugins/clipboard/index.less
index 1edab2bdf64..cd5f5cd24af 100644
--- a/sites/x6-sites/src/tutorial/plugins/clipboard/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/clipboard/index.less
@@ -1,28 +1,36 @@
-.app {
+.clipboard-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-
-.app-side {
- bottom: 0;
- padding: 0 8px;
-}
-.app-btns {
- display: flex;
- margin-top: 16px;
-}
+ .app-side {
+ bottom: 0;
+ padding: 0 8px;
+
+ .slider-value {
+ display: inline-block;
+ margin-left: 8px;
+ padding: 3px 7px;
+ color: #333;
+ font-size: 12px;
+ line-height: 1.25;
+ background: #eee;
+ border-radius: 10px;
+ }
+
+ .app-btns {
+ display: flex;
+ margin-top: 16px;
+ }
+ }
-.app-content {
- flex: 1;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .app-content {
+ flex: 1;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-:global {
.ant-btn {
flex: 1;
margin-right: 8px;
@@ -35,11 +43,11 @@
.ant-card {
box-shadow: 0 0 10px 1px #e9e9e9;
}
-
+
.ant-card-head-title {
text-align: center;
}
-
+
.ant-row {
margin: 16px 0;
text-align: left;
@@ -48,19 +56,8 @@
.x6-widget-selection-box {
border: 2px dashed #239edd;
}
-
+
.x6-widget-selection-inner {
border: 1px solid #239edd;
}
}
-
-.slider-value {
- display: inline-block;
- margin-left: 8px;
- padding: 3px 7px;
- color: #333;
- font-size: 12px;
- line-height: 1.25;
- background: #eee;
- border-radius: 10px;
-}
diff --git a/sites/x6-sites/src/tutorial/plugins/clipboard/index.tsx b/sites/x6-sites/src/tutorial/plugins/clipboard/index.tsx
index dc1c6fab163..33a17b0c2ad 100644
--- a/sites/x6-sites/src/tutorial/plugins/clipboard/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/clipboard/index.tsx
@@ -4,7 +4,7 @@ import { Graph } from '@antv/x6'
import { Clipboard } from '@antv/x6-plugin-clipboard'
import { Selection } from '@antv/x6-plugin-selection'
import { Settings, State } from './settings'
-import styles from './index.less'
+import './index.less'
export default class Example extends React.Component {
private container: HTMLDivElement
@@ -126,10 +126,10 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
+
-
+
@@ -138,7 +138,7 @@ export default class Example extends React.Component {
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/clipboard/settings.tsx b/sites/x6-sites/src/tutorial/plugins/clipboard/settings.tsx
index ec43295b393..5ea37dd34b6 100644
--- a/sites/x6-sites/src/tutorial/plugins/clipboard/settings.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/clipboard/settings.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Checkbox, Slider, Card, Row, Col } from 'antd'
-import styles from './index.less'
+import './index.less'
export interface Props {
onChange: (res: State) => void
@@ -50,7 +50,7 @@ export class Settings extends React.Component
{
Paste Offset
- {this.state.offset}
+ {this.state.offset}
diff --git a/sites/x6-sites/src/tutorial/plugins/dnd/index.less b/sites/x6-sites/src/tutorial/plugins/dnd/index.less
index c2c0d00138c..9f76624b05e 100644
--- a/sites/x6-sites/src/tutorial/plugins/dnd/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/dnd/index.less
@@ -1,46 +1,45 @@
-.app {
+.dnd-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-content {
- flex: 1;
- height: 240px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .app-content {
+ flex: 1;
+ height: 240px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-.dnd-wrap {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 200px;
- padding: 16px;
- border: 1px solid #f0f0f0;
- user-select: none;
-}
+ .dnd-wrap {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 200px;
+ padding: 16px;
+ border: 1px solid #f0f0f0;
+ user-select: none;
-.dnd-rect {
- width: 100px;
- height: 40px;
- margin: 16px;
- line-height: 40px;
- text-align: center;
- border: 1px solid #8f8f8f;
- border-radius: 6px;
- cursor: move;
-}
+ .dnd-rect {
+ width: 100px;
+ height: 40px;
+ margin: 16px;
+ line-height: 40px;
+ text-align: center;
+ border: 1px solid #8f8f8f;
+ border-radius: 6px;
+ cursor: move;
+ }
-.dnd-circle {
- width: 60px;
- height: 60px;
- margin: 16px;
- line-height: 60px;
- text-align: center;
- border: 1px solid #8f8f8f;
- border-radius: 100%;
- cursor: move;
+ .dnd-circle {
+ width: 60px;
+ height: 60px;
+ margin: 16px;
+ line-height: 60px;
+ text-align: center;
+ border: 1px solid #8f8f8f;
+ border-radius: 100%;
+ cursor: move;
+ }
+ }
}
diff --git a/sites/x6-sites/src/tutorial/plugins/dnd/index.tsx b/sites/x6-sites/src/tutorial/plugins/dnd/index.tsx
index a09dbac216f..206dc4d5483 100644
--- a/sites/x6-sites/src/tutorial/plugins/dnd/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/dnd/index.tsx
@@ -3,7 +3,7 @@ import React from 'react'
import { Graph } from '@antv/x6'
import { Dnd } from '@antv/x6-plugin-dnd'
import { Snapline } from '@antv/x6-plugin-snapline'
-import styles from './index.less'
+import './index.less'
export default class Example extends React.Component {
private graph: Graph
@@ -130,25 +130,25 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/history/index.less b/sites/x6-sites/src/tutorial/plugins/history/index.less
index f65b76e34dd..02a10eac4c8 100644
--- a/sites/x6-sites/src/tutorial/plugins/history/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/history/index.less
@@ -1,20 +1,18 @@
-.app {
- display: flex;
- flex-direction: column;
+.history-app {
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-btns {
- bottom: 0;
- padding: 0 8px;
-}
+ .app-btns {
+ bottom: 0;
+ margin: 0;
+ padding: 0 8px;
+ }
-.app-content {
- height: 240px;
- margin-top: 16px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
+ .app-content {
+ width: 100%;
+ height: 240px;
+ margin: 0;
+ margin-top: 16px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
}
diff --git a/sites/x6-sites/src/tutorial/plugins/history/index.tsx b/sites/x6-sites/src/tutorial/plugins/history/index.tsx
index 7d7e56e6fe8..7c98e10ed1c 100644
--- a/sites/x6-sites/src/tutorial/plugins/history/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/history/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { Button } from 'antd'
import { Graph } from '@antv/x6'
import { History } from '@antv/x6-plugin-history'
-import styles from './index.less'
+import './index.less'
interface Props {}
@@ -75,8 +75,8 @@ export default class App extends React.Component
{
render() {
return (
-
-
+
+
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/keyboard/index.less b/sites/x6-sites/src/tutorial/plugins/keyboard/index.less
index 965b08b2654..4cf0f9c4b2f 100644
--- a/sites/x6-sites/src/tutorial/plugins/keyboard/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/keyboard/index.less
@@ -1,39 +1,36 @@
-.app {
- display: flex;
- flex-direction: column;
+.keyboard-app {
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-info {
- bottom: 0;
- padding: 0 8px;
-}
+ .app-info {
+ bottom: 0;
+ margin: 0;
+ padding: 0 8px;
+ }
-.app-info span {
- display: inline-block;
- margin-right: 8px;
- padding: 2px 8px;
- font-size: 12px;
- line-height: 18px;
- background: #e9e9e9;
- border-radius: 4px;
-}
+ .app-info span {
+ display: inline-block;
+ margin-right: 8px;
+ padding: 2px 8px;
+ font-size: 12px;
+ line-height: 18px;
+ background: #e9e9e9;
+ border-radius: 4px;
+ }
-.app-content {
- height: 280px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .app-content {
+ width: 100%;
+ height: 280px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-:global {
.x6-widget-selection-box {
border: 2px dashed #239edd;
}
-
+
.x6-widget-selection-inner {
border: 1px solid #239edd;
- }
-}
\ No newline at end of file
+ }
+}
diff --git a/sites/x6-sites/src/tutorial/plugins/keyboard/index.tsx b/sites/x6-sites/src/tutorial/plugins/keyboard/index.tsx
index 0fc1d863a40..0add2ec9905 100644
--- a/sites/x6-sites/src/tutorial/plugins/keyboard/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/keyboard/index.tsx
@@ -3,7 +3,7 @@ import { Graph } from '@antv/x6'
import { Clipboard } from '@antv/x6-plugin-clipboard'
import { Selection } from '@antv/x6-plugin-selection'
import { Keyboard } from '@antv/x6-plugin-keyboard'
-import styles from './index.less'
+import './index.less'
export default class Example extends React.Component {
private container: HTMLDivElement
@@ -120,14 +120,14 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
+
Ctrl + CCopy Cell
Ctrl + VPaste Cell
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/minimap/index.less b/sites/x6-sites/src/tutorial/plugins/minimap/index.less
index 8aa780cf238..04ab1f1ee4c 100644
--- a/sites/x6-sites/src/tutorial/plugins/minimap/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/minimap/index.less
@@ -1,35 +1,32 @@
-.app {
+.minimap-app {
display: flex;
height: 320px;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-
-.app-content {
- flex: 1;
- width: 400px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
-.x6-graph-scroller {
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .app-content {
+ flex: 1;
+ width: 400px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-.app-minimap {
- width: 200px;
- height: 150px;
- margin-top: -10px;
-}
+ .app-minimap {
+ width: 200px;
+ height: 150px;
+ margin-top: -10px;
+ }
-:global {
.x6-widget-minimap-viewport {
border: 2px solid #8f8f8f;
}
-
+
.x6-widget-minimap-viewport-zoom {
border: 2px solid #8f8f8f;
- }
-}
\ No newline at end of file
+ }
+
+ .x6-graph-scroller {
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
+}
diff --git a/sites/x6-sites/src/tutorial/plugins/minimap/index.tsx b/sites/x6-sites/src/tutorial/plugins/minimap/index.tsx
index 8d0c2c70ab2..b7c5c7b4c49 100644
--- a/sites/x6-sites/src/tutorial/plugins/minimap/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/minimap/index.tsx
@@ -2,7 +2,7 @@ import * as React from 'react'
import { Graph } from '@antv/x6'
import { MiniMap } from '@antv/x6-plugin-minimap'
import { Scroller } from '@antv/x6-plugin-scroller'
-import styles from './index.less'
+import './index.less'
export default class Example extends React.Component {
private container: HTMLDivElement
@@ -109,9 +109,9 @@ export default class Example extends React.Component {
render() {
return (
-
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/scroller/index.less b/sites/x6-sites/src/tutorial/plugins/scroller/index.less
index 50b3d554444..0785ba29487 100644
--- a/sites/x6-sites/src/tutorial/plugins/scroller/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/scroller/index.less
@@ -1,64 +1,63 @@
-.app {
+.scroller-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-
-.app-side {
- bottom: 0;
- padding: 0 8px;
-}
-
-.app-main {
- display: flex;
- flex-direction: column;
- width: 600px;
- margin-right: 8px;
- margin-left: 8px;
-}
-
-.app-btns {
- display: flex;
- padding-top: 4px;
- padding-bottom: 12px;
-}
-
-.app-btns .ant-btn {
- flex: 1;
- margin-right: 16px;
-}
-
-.app-content {
- flex: 1;
- margin-right: 8px;
- margin-left: 8px;
-}
-
-.x6-graph-scroller {
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
-
-.ant-card {
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
-
-.ant-card-head-title {
- text-align: center;
-}
-
-.ant-row {
- margin: 16px 0;
- text-align: left;
-}
-.slider-value {
- display: inline-block;
- margin-left: 8px;
- padding: 3px 7px;
- color: #333;
- font-size: 12px;
- line-height: 1.25;
- background: #eee;
- border-radius: 10px;
+ .app-side {
+ bottom: 0;
+ padding: 0 8px;
+
+ .slider-value {
+ display: inline-block;
+ margin-left: 8px;
+ padding: 3px 7px;
+ color: #333;
+ font-size: 12px;
+ line-height: 1.25;
+ background: #eee;
+ border-radius: 10px;
+ }
+ }
+
+ .app-main {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ margin-right: 8px;
+ margin-left: 8px;
+
+ .app-btns {
+ display: flex;
+ padding-top: 4px;
+ padding-bottom: 12px;
+ }
+
+ .app-btns .ant-btn {
+ flex: 1;
+ margin-right: 16px;
+ }
+
+ .app-content {
+ flex: 1;
+ margin-right: 8px;
+ margin-left: 8px;
+ }
+ }
+
+ .x6-graph-scroller {
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
+
+ .ant-card {
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
+
+ .ant-card-head-title {
+ text-align: center;
+ }
+
+ .ant-row {
+ margin: 16px 0;
+ text-align: left;
+ }
}
diff --git a/sites/x6-sites/src/tutorial/plugins/scroller/index.tsx b/sites/x6-sites/src/tutorial/plugins/scroller/index.tsx
index ce13210b13e..a30b2fde343 100644
--- a/sites/x6-sites/src/tutorial/plugins/scroller/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/scroller/index.tsx
@@ -3,7 +3,7 @@ import { Button } from 'antd'
import { Graph } from '@antv/x6'
import { Scroller } from '@antv/x6-plugin-scroller'
import { Settings, State } from './settings'
-import styles from './index.less'
+import './index.less'
const data = {
hello: {
@@ -131,17 +131,17 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
+
-
-
+
+
-
+
)
diff --git a/sites/x6-sites/src/tutorial/plugins/scroller/settings.tsx b/sites/x6-sites/src/tutorial/plugins/scroller/settings.tsx
index ae6c211a46e..1b583f6427f 100644
--- a/sites/x6-sites/src/tutorial/plugins/scroller/settings.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/scroller/settings.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Checkbox, Slider, Card, Row, Col } from 'antd'
-import styles from './index.less'
+import './index.less'
export interface Props {
onChange: (res: State) => void
@@ -127,9 +127,7 @@ export class Settings extends React.Component
{
Min Visible Width
-
- {this.state.minVisibleWidth}
-
+ {this.state.minVisibleWidth}
@@ -155,9 +153,7 @@ export class Settings extends React.Component {
Min Visible Height
-
- {this.state.minVisibleHeight}
-
+ {this.state.minVisibleHeight}
diff --git a/sites/x6-sites/src/tutorial/plugins/selection/index.less b/sites/x6-sites/src/tutorial/plugins/selection/index.less
index 5279dc42442..6da184ee51b 100644
--- a/sites/x6-sites/src/tutorial/plugins/selection/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/selection/index.less
@@ -1,40 +1,37 @@
-.app {
+.selection-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-side {
- bottom: 0;
- padding: 0 8px;
-}
+ .app-side {
+ bottom: 0;
+ padding: 0 8px;
+ }
-.app-content {
- flex: 1;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .app-content {
+ flex: 1;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-:global {
.ant-card {
box-shadow: 0 0 10px 1px #e9e9e9;
}
-
+
.ant-card-head-title {
text-align: center;
}
-
+
.ant-row {
margin: 16px 0;
text-align: left;
}
-
+
.x6-widget-selection-box {
border: 2px dashed #239edd;
}
-
+
.x6-widget-selection-inner {
border: 1px solid #239edd;
}
diff --git a/sites/x6-sites/src/tutorial/plugins/selection/index.tsx b/sites/x6-sites/src/tutorial/plugins/selection/index.tsx
index 1a1efc390d0..1877f9fbdca 100644
--- a/sites/x6-sites/src/tutorial/plugins/selection/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/selection/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { Graph } from '@antv/x6'
import { Selection } from '@antv/x6-plugin-selection'
import { Settings, State } from './settings'
-import styles from './index.less'
+import './index.less'
export default class Example extends React.Component {
private container: HTMLDivElement
@@ -112,11 +112,11 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/snapline/index.less b/sites/x6-sites/src/tutorial/plugins/snapline/index.less
index 54cf8ab0b75..85c224fae39 100644
--- a/sites/x6-sites/src/tutorial/plugins/snapline/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/snapline/index.less
@@ -1,44 +1,41 @@
-.app {
+.snapline-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-side {
- bottom: 0;
- padding: 0 8px;
-}
+ .app-side {
+ bottom: 0;
+ padding: 0 8px;
-.app-content {
- flex: 1;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .slider-value {
+ display: inline-block;
+ margin-left: 8px;
+ padding: 3px 7px;
+ color: #333;
+ font-size: 12px;
+ line-height: 1.25;
+ background: #eee;
+ border-radius: 10px;
+ }
+ }
+
+ .app-content {
+ flex: 1;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-:global {
.ant-card {
box-shadow: 0 0 10px 1px #e9e9e9;
}
-
+
.ant-card-head-title {
text-align: center;
}
-
+
.ant-row {
margin: 16px 0;
text-align: left;
}
}
-
-.slider-value {
- display: inline-block;
- margin-left: 8px;
- padding: 3px 7px;
- color: #333;
- font-size: 12px;
- line-height: 1.25;
- background: #eee;
- border-radius: 10px;
-}
diff --git a/sites/x6-sites/src/tutorial/plugins/snapline/index.tsx b/sites/x6-sites/src/tutorial/plugins/snapline/index.tsx
index 1488caaa2ee..715056f93e0 100644
--- a/sites/x6-sites/src/tutorial/plugins/snapline/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/snapline/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { Graph } from '@antv/x6'
import { Snapline } from '@antv/x6-plugin-snapline'
import { Settings, State } from './settings'
-import styles from './index.less'
+import './index.less'
export default class Example extends React.Component {
private container: HTMLDivElement
@@ -108,11 +108,11 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/snapline/settings.tsx b/sites/x6-sites/src/tutorial/plugins/snapline/settings.tsx
index 88a278ce108..6fe3df3c415 100644
--- a/sites/x6-sites/src/tutorial/plugins/snapline/settings.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/snapline/settings.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Checkbox, Slider, Card, Row, Col } from 'antd'
-import styles from './index.less'
+import './index.less'
export interface Props {
onChange: (res: State) => void
@@ -74,7 +74,7 @@ export class Settings extends React.Component
{
Tolerance
- {this.state.tolerance}
+ {this.state.tolerance}
diff --git a/sites/x6-sites/src/tutorial/plugins/stencil/index.less b/sites/x6-sites/src/tutorial/plugins/stencil/index.less
index a55543fa312..31c25900a7c 100644
--- a/sites/x6-sites/src/tutorial/plugins/stencil/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/stencil/index.less
@@ -1,20 +1,19 @@
-.app {
+.stencil-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-stencil {
- position: relative;
- width: 200px;
- border: 1px solid #f0f0f0;
-}
+ .app-stencil {
+ position: relative;
+ width: 200px;
+ border: 1px solid #f0f0f0;
+ }
-.app-content {
- flex: 1;
- height: 350px;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
\ No newline at end of file
+ .app-content {
+ flex: 1;
+ height: 350px;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
+}
diff --git a/sites/x6-sites/src/tutorial/plugins/stencil/index.tsx b/sites/x6-sites/src/tutorial/plugins/stencil/index.tsx
index c61c48fd761..5bb793502ba 100644
--- a/sites/x6-sites/src/tutorial/plugins/stencil/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/stencil/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { Graph } from '@antv/x6'
import { Snapline } from '@antv/x6-plugin-snapline'
import { Stencil } from '@antv/x6-plugin-stencil'
-import styles from './index.less'
+import './index.less'
const commonAttrs = {
body: {
@@ -159,9 +159,9 @@ export default class Example extends React.Component {
render() {
return (
-
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/transform/resizing/index.less b/sites/x6-sites/src/tutorial/plugins/transform/resizing/index.less
index 64d4f47ecf2..8ff3d282efc 100644
--- a/sites/x6-sites/src/tutorial/plugins/transform/resizing/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/transform/resizing/index.less
@@ -1,67 +1,64 @@
-.app {
+.resizing-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-side {
- bottom: 0;
- padding: 0 8px;
-}
+ .app-side {
+ bottom: 0;
+ padding: 0 8px;
-.app-content {
- flex: 1;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .slider-value {
+ display: inline-block;
+ margin-left: 8px;
+ padding: 3px 7px;
+ color: #333;
+ font-size: 12px;
+ line-height: 1.25;
+ background: #eee;
+ border-radius: 10px;
+ }
+ }
-:global {
- .ant-card {
+ .app-content {
+ flex: 1;
+ margin-right: 8px;
+ margin-left: 8px;
box-shadow: 0 0 10px 1px #e9e9e9;
}
-
- .ant-card-head-title {
- text-align: center;
+
+ .x6-widget-transform {
+ margin: -1px 0 0 -1px;
+ padding: 0;
+ border: 1px solid #239edd;
+ border-radius: 6px;
}
-
- .ant-row {
- margin: 16px 0;
- text-align: left;
+
+ .x6-widget-transform > div {
+ border: 1px solid #239edd;
}
-}
-.slider-value {
- display: inline-block;
- margin-left: 8px;
- padding: 3px 7px;
- color: #333;
- font-size: 12px;
- line-height: 1.25;
- background: #eee;
- border-radius: 10px;
-}
+ .x6-widget-transform > div:hover {
+ background-color: #3dafe4;
+ }
-.x6-widget-transform {
- margin: -1px 0 0 -1px;
- padding: 0;
- border: 1px solid #239edd;
- border-radius: 6px;
-}
+ .x6-widget-transform-active-handle {
+ background-color: #3dafe4;
+ }
-.x6-widget-transform > div {
- border: 1px solid #239edd;
-}
+ .x6-widget-transform-resize {
+ border-radius: 0;
+ }
-.x6-widget-transform > div:hover {
- background-color: #3dafe4;
-}
+ .ant-card {
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
-.x6-widget-transform-active-handle {
- background-color: #3dafe4;
-}
+ .ant-card-head-title {
+ text-align: center;
+ }
-.x6-widget-transform-resize {
- border-radius: 0;
+ .ant-row {
+ margin: 16px 0;
+ text-align: left;
+ }
}
diff --git a/sites/x6-sites/src/tutorial/plugins/transform/resizing/index.tsx b/sites/x6-sites/src/tutorial/plugins/transform/resizing/index.tsx
index 95402e010e4..10507449e8a 100644
--- a/sites/x6-sites/src/tutorial/plugins/transform/resizing/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/transform/resizing/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { Graph } from '@antv/x6'
import { Transform } from '@antv/x6-plugin-transform'
import { Settings, State } from './settings'
-import styles from './index.less'
+import './index.less'
export default class Example extends React.Component {
private container: HTMLDivElement
@@ -95,11 +95,11 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/transform/resizing/settings.tsx b/sites/x6-sites/src/tutorial/plugins/transform/resizing/settings.tsx
index efdd86857fa..ee5caec5fed 100644
--- a/sites/x6-sites/src/tutorial/plugins/transform/resizing/settings.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/transform/resizing/settings.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Checkbox, Slider, Card, Row, Col } from 'antd'
-import styles from './index.less'
+import './index.less'
export interface Props {
onChange: (res: State) => void
@@ -113,7 +113,7 @@ export class Settings extends React.Component
{
/>
- {this.state.minWidth}
+ {this.state.minWidth}
@@ -128,7 +128,7 @@ export class Settings extends React.Component {
/>
- {this.state.maxWidth}
+ {this.state.maxWidth}
@@ -143,7 +143,7 @@ export class Settings extends React.Component {
/>
- {this.state.minHeight}
+ {this.state.minHeight}
@@ -158,7 +158,7 @@ export class Settings extends React.Component {
/>
- {this.state.maxHeight}
+ {this.state.maxHeight}
diff --git a/sites/x6-sites/src/tutorial/plugins/transform/rotating/index.less b/sites/x6-sites/src/tutorial/plugins/transform/rotating/index.less
index b9c332eb23c..629bbd3681a 100644
--- a/sites/x6-sites/src/tutorial/plugins/transform/rotating/index.less
+++ b/sites/x6-sites/src/tutorial/plugins/transform/rotating/index.less
@@ -1,64 +1,61 @@
-.app {
+.rotating-app {
display: flex;
padding: 0;
- padding: 16px 8px;
font-family: sans-serif;
-}
-.app-side {
- bottom: 0;
- padding: 0 8px;
-}
+ .app-side {
+ bottom: 0;
+ padding: 0 8px;
+
+ .slider-value {
+ display: inline-block;
+ margin-left: 8px;
+ padding: 3px 7px;
+ color: #333;
+ font-size: 12px;
+ line-height: 1.25;
+ background: #eee;
+ border-radius: 10px;
+ }
+ }
-.app-content {
- flex: 1;
- margin-right: 8px;
- margin-left: 8px;
- box-shadow: 0 0 10px 1px #e9e9e9;
-}
+ .app-content {
+ flex: 1;
+ margin-right: 8px;
+ margin-left: 8px;
+ box-shadow: 0 0 10px 1px #e9e9e9;
+ }
+
+ .x6-widget-transform {
+ margin: -1px 0 0 -1px;
+ padding: 0;
+ border: 1px solid #239edd;
+ border-radius: 6px;
+ }
+
+ .x6-widget-transform > div {
+ border: 1px solid #239edd;
+ }
+
+ .x6-widget-transform > div:hover {
+ background-color: #3dafe4;
+ }
+
+ .x6-widget-transform-active-handle {
+ background-color: #3dafe4;
+ }
-:global {
.ant-card {
min-height: 250px;
box-shadow: 0 0 10px 1px #e9e9e9;
}
-
+
.ant-card-head-title {
text-align: center;
}
-
+
.ant-row {
margin: 16px 0;
text-align: left;
}
}
-
-.slider-value {
- display: inline-block;
- margin-left: 8px;
- padding: 3px 7px;
- color: #333;
- font-size: 12px;
- line-height: 1.25;
- background: #eee;
- border-radius: 10px;
-}
-
-.x6-widget-transform {
- margin: -1px 0 0 -1px;
- padding: 0;
- border: 1px solid #239edd;
- border-radius: 6px;
-}
-
-.x6-widget-transform > div {
- border: 1px solid #239edd;
-}
-
-.x6-widget-transform > div:hover {
- background-color: #3dafe4;
-}
-
-.x6-widget-transform-active-handle {
- background-color: #3dafe4;
-}
diff --git a/sites/x6-sites/src/tutorial/plugins/transform/rotating/index.tsx b/sites/x6-sites/src/tutorial/plugins/transform/rotating/index.tsx
index c833dd0ba15..31f684b6613 100644
--- a/sites/x6-sites/src/tutorial/plugins/transform/rotating/index.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/transform/rotating/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
import { Graph } from '@antv/x6'
import { Transform } from '@antv/x6-plugin-transform'
import { Settings, State } from './settings'
-import styles from './index.less'
+import './index.less'
export default class Example extends React.Component {
private container: HTMLDivElement
@@ -91,11 +91,11 @@ export default class Example extends React.Component {
render() {
return (
-
-
+
)
}
diff --git a/sites/x6-sites/src/tutorial/plugins/transform/rotating/settings.tsx b/sites/x6-sites/src/tutorial/plugins/transform/rotating/settings.tsx
index 9eb65408917..a4ace5bb617 100644
--- a/sites/x6-sites/src/tutorial/plugins/transform/rotating/settings.tsx
+++ b/sites/x6-sites/src/tutorial/plugins/transform/rotating/settings.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { Checkbox, Slider, Card, Row, Col } from 'antd'
-import styles from './index.less'
+import './index.less'
export interface Props {
onChange: (res: State) => void
@@ -65,7 +65,7 @@ export class Settings extends React.Component
{
/>
- {this.state.grid}
+ {this.state.grid}