diff --git a/docs/src/pages/people.module.css b/docs/src/pages/people.module.css
index e63aaaca4811..6dd0319bbf05 100644
--- a/docs/src/pages/people.module.css
+++ b/docs/src/pages/people.module.css
@@ -39,4 +39,4 @@ div.personImage {
font-size: 40px;
margin-top: 30px;
}
-}
\ No newline at end of file
+}
diff --git a/docs/src/pages/playground.js b/docs/src/pages/playground.js
index 44005daf3daa..b736d417a585 100644
--- a/docs/src/pages/playground.js
+++ b/docs/src/pages/playground.js
@@ -195,6 +195,7 @@ export function EditorDemo({ compileFn, examples, mermaidId }) {
const [showGraphOpts, setShowGraphOpts] = useState(false);
const [writeGraphConfig, setWriteGraphConfig] = useState({
+ // Code relies on key order.
noSubgraphs: false,
noVarnames: false,
noPullPush: false,
@@ -203,6 +204,7 @@ export function EditorDemo({ compileFn, examples, mermaidId }) {
});
const writeGraphConfigOnChange = (name) => {
writeGraphConfig[name] = !writeGraphConfig[name];
+ // Code relies on key order, `{ ...x }` preserves key order.
setWriteGraphConfig({ ...writeGraphConfig });
return true;
};
@@ -252,15 +254,9 @@ export function EditorDemo({ compileFn, examples, mermaidId }) {
{(() => {
if (null == output) {
@@ -270,7 +266,30 @@ export function EditorDemo({ compileFn, examples, mermaidId }) {
;
}
if (showingMermaid) {
- return ;
+ return ;
} else {
return
-
-
- {Object.keys(writeGraphConfig).map(name => {
- return (
-
-
-
- )
- })}
-
-
}
diff --git a/docs/src/pages/playground.module.css b/docs/src/pages/playground.module.css
index 5d57c3c32a3e..a51c77aaf3a0 100644
--- a/docs/src/pages/playground.module.css
+++ b/docs/src/pages/playground.module.css
@@ -25,26 +25,37 @@
}
}
-.unselected-tab {
- color: gray;
+.unselected-tab, .selected-tab, .opts-toggle {
+ cursor: pointer;
}
-.unselected-tab:hover {
+.unselected-tab, .unselected-tab:hover {
color: gray;
}
-.selected-tab {
- color: black;
-}
-
-.selected-tab:hover {
+.selected-tab, .selected-tab:hover, .opts-toggle, .opts-toggle:hover {
color: black;
}
-[data-theme='dark'] .selected-tab {
+[data-theme='dark'] .selected-tab, [data-theme='dark'] .selected-tab:hover, [data-theme='dark'] .opts-toggle {
color: white;
}
-[data-theme='dark'] .selected-tab:hover {
- color: white;
-}
+.opts-toggle {
+ position: absolute;
+ top: -2em;
+ right: 0;
+}
+.opts-pane {
+ position: absolute;
+ top: 0;
+ right: 0;
+ padding: 0.5em;
+ background-color: var(--ifm-background-surface-color);
+ box-shadow: var(--ifm-navbar-shadow);
+}
+.opts-list {
+ list-style-type: none; /* Remove bullets */
+ padding: 0; /* Remove padding */
+ margin: 0;
+}
\ No newline at end of file