Commit 379ab1b7 authored by chenshouchao's avatar chenshouchao

Merge branch 'feat-20220801' into 'release'

cn-Feat 20220801

See merge request !88
parents 21df7ddd d10e919b
......@@ -27,23 +27,8 @@ const MySwitch = (props: IMySwitchProps) => {
...other
} = props;
const bgColor = useMemo(() => {
if (disabled) {
if (value) {
return "rgba(166, 211, 255, 1)";
} else {
return "rgba(221, 225, 230, 1)";
}
} else {
if (value) {
return "rgba(19, 112, 255, 1)";
} else {
return "rgba(221, 225, 230, 1)";
}
}
}, [disabled, value]);
const theme = createTheme({
const theme = useMemo(() => {
return createTheme({
components: {
MuiSwitch: {
styleOverrides: {
......@@ -58,7 +43,9 @@ const MySwitch = (props: IMySwitchProps) => {
"&.Mui-checked": {
left: "2px",
"& + .MuiSwitch-track": {
backgroundColor: bgColor,
backgroundColor: disabled
? "rgba(166, 211, 255, 1)"
: "rgba(19, 112, 255, 1)",
opacity: 1,
},
},
......@@ -70,13 +57,16 @@ const MySwitch = (props: IMySwitchProps) => {
},
track: {
borderRadius: "11px",
backgroundColor: "rgba(221, 225, 230, 1)",
backgroundColor: disabled
? "RGBA(240, 242, 245, 1)"
: "RGBA(221, 225, 230, 1)",
opacity: 1,
},
},
},
},
});
}, [disabled]);
return (
<ThemeProvider theme={theme}>
......
.reactFlowBox > div:last-child {
display: none;
}
.reactFlowBox > div:first-child {
/* .reactFlowBox > div:first-child {
margin-top: 32px;
}
} */
......@@ -668,7 +668,6 @@ const Flow = (props: IProps) => {
className={styles.reactFlowBox}
nodes={nodes}
edges={edges}
fitView={flowType === "default" ? true : false}
{...reactFlowParams}
// proOptions={{ hideAttribution: true, account: "" }}
nodeTypes={nodeTypes}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment