diff --git a/website-next/src/components/EditorToolbar.tsx b/website-next/src/components/EditorToolbar.tsx
index 915efa96..afa1f356 100644
--- a/website-next/src/components/EditorToolbar.tsx
+++ b/website-next/src/components/EditorToolbar.tsx
@@ -11,7 +11,6 @@ import {useCallback, useEffect, useRef, useState} from 'react';
import clsx from 'clsx';
import lzString from 'lz-string';
-import CopyIcon from '../../static/img/copy.svg';
import LinkIcon from '../../static/img/link.svg';
import SuccessIcon from '@theme/Icon/Success';
@@ -28,10 +27,6 @@ export default function EditorToolbar({
className,
style,
}: Props): JSX.Element {
- const handleCopy = useCallback(() => {
- navigator.clipboard.writeText(code);
- }, [code]);
-
const handleShare = useCallback(() => {
navigator.clipboard.writeText(
window.location.origin +
@@ -41,7 +36,6 @@ export default function EditorToolbar({
return (
-
);
diff --git a/website-next/src/components/Playground.module.css b/website-next/src/components/Playground.module.css
index a3839ad7..4f73052b 100644
--- a/website-next/src/components/Playground.module.css
+++ b/website-next/src/components/Playground.module.css
@@ -7,7 +7,6 @@
html[data-theme='light'] {
--yg-color-preview-background: var(--ifm-color-primary-lighter);
- --yg-color-playground-background: var(--ifm-color-gray-200);
--yg-color-editor-border: var(--ifm-color-gray-400);
--yg-color-editor-fallback-bg: rgb(246, 248, 250);
--yg-color-editor-fallback-text: rgb(0, 0, 159);
@@ -15,19 +14,14 @@ html[data-theme='light'] {
html[data-theme='dark'] {
--yg-color-preview-background: var(--ifm-color-primary-dark);
- --yg-color-playground-background: var(--ifm-color-background);
--yg-color-editor-border: var(--ifm-color-gray-800);
--yg-color-editor-fallback-bg: rgb(40, 44, 52);
--yg-color-editor-fallback-text: rgb(209, 154, 102);
}
.wrapper {
- display: flex;
- justify-content: center;
- min-width: 900px;
- width: 100%;
+ min-width: 600px;
padding-block: 16px;
- background-color: var(--yg-color-playground-background);
}
.playgroundRow {
@@ -59,12 +53,13 @@ html[data-theme='dark'] {
font: var(--ifm-code-font-size) / var(--ifm-pre-line-height)
var(--ifm-font-family-monospace) !important;
direction: ltr;
- height: calc(var(--yg-playground-height, 400px) - 32px);
+ height: calc(var(--yg-playground-height) - 32px);
}
.playgroundEditor :global(.prism-code) {
box-shadow: var(--ifm-global-shadow-lw);
- min-height: 100%;
+ height: calc(var(--yg-playground-height) - 32px);
+ min-height: 300px;
border-radius: 0;
padding: var(--ifm-pre-padding) !important;
}
@@ -77,13 +72,14 @@ html[data-theme='dark'] {
.previewColumn {
display: flex;
flex: 5;
- height: calc(var(--yg-playground-height, 400px) - 32px);
+ height: calc(var(--yg-playground-height) - 32px);
+ min-height: 300px;
align-items: center;
justify-content: center;
background-color: var(--yg-color-preview-background);
overflow: hidden;
border-radius: var(--ifm-pre-border-radius);
- align-self: flex-start;
+ align-self: stretch;
box-shadow: var(--ifm-global-shadow-lw);
}
@@ -112,12 +108,12 @@ html[data-theme='dark'] {
}
.playgroundEditor :global(.prism-code) {
+ height: unset;
min-height: 10em;
}
.playgroundRow {
flex-direction: column;
- padding-inline: 5px;
}
.editorColumn {
diff --git a/website-next/src/components/Playground.tsx b/website-next/src/components/Playground.tsx
index c2091d90..479e2906 100644
--- a/website-next/src/components/Playground.tsx
+++ b/website-next/src/components/Playground.tsx
@@ -85,7 +85,7 @@ export default function Playground({code, height, autoFocus}: Props) {
theme={prismTheme}
scope={{Node: LiveNode, Layout: RootLiveNode}}>
-
+
+
);
diff --git a/website-next/src/pages/playground.tsx b/website-next/src/pages/playground.tsx
index d16be6f4..cfdc6bca 100644
--- a/website-next/src/pages/playground.tsx
+++ b/website-next/src/pages/playground.tsx
@@ -11,6 +11,7 @@ import lzString from 'lz-string';
import Playground from '../components/Playground';
+import clsx from 'clsx';
import styles from './playground.module.css';
import useIsBrowser from '@docusaurus/useIsBrowser';
@@ -27,7 +28,7 @@ export default function PlaygroundPage(): JSX.Element {
return (
// @ts-ignore missing prop for `wrapperClassName`
-
+
-
-