diff --git a/packages/page-accounts/src/index.tsx b/packages/page-accounts/src/index.tsx
index 0300db3812..322952109b 100644
--- a/packages/page-accounts/src/index.tsx
+++ b/packages/page-accounts/src/index.tsx
@@ -24,7 +24,7 @@ function AccountsApp ({ basePath, onStatusChange }: Props): React.ReactElement
diff --git a/packages/page-js/src/Playground.tsx b/packages/page-js/src/Playground.tsx
index 7825ec963a..b335e99bd6 100644
--- a/packages/page-js/src/Playground.tsx
+++ b/packages/page-js/src/Playground.tsx
@@ -10,7 +10,7 @@ import type { Log, LogType, Snippet } from './types';
import React, { useCallback, useEffect, useRef, useState } from 'react';
import styled from 'styled-components';
-import { Button, Dropdown, Editor } from '@polkadot/react-components';
+import { Button, Dropdown, Editor, Tabs } from '@polkadot/react-components';
import { useApi, useToggle } from '@polkadot/react-hooks';
import * as types from '@polkadot/types';
import uiKeyring from '@polkadot/ui-keyring';
@@ -73,7 +73,7 @@ function setupInjected ({ api, isDevelopment }: ApiProps, setIsRunning: (isRunni
}
// FIXME This... ladies & gentlemen, is a mess that should be untangled
-function Playground ({ className = '' }: Props): React.ReactElement {
+function Playground ({ basePath, className = '' }: Props): React.ReactElement {
const { t } = useTranslation();
const apiProps = useApi();
const injectedRef = useRef(null);
@@ -86,6 +86,14 @@ function Playground ({ className = '' }: Props): React.ReactElement {
const [options, setOptions] = useState([]);
const [selected, setSelected] = useState(snippets[0]);
+ const tabsRef = useRef([
+ {
+ isRoot: true,
+ name: 'playground',
+ text: t('Javascript')
+ }
+ ]);
+
// initialize all options
useEffect((): void => {
// add snippets if not already available (global)
@@ -226,7 +234,13 @@ function Playground ({ className = '' }: Props): React.ReactElement {
return (
-
+
+
{
options={options}
value={selected.value}
/>
-
+
div {
max-width: 35rem !important;
diff --git a/packages/react-components/src/HelpOverlay.tsx b/packages/react-components/src/HelpOverlay.tsx
index 5fd18550b2..f7f0319ea9 100644
--- a/packages/react-components/src/HelpOverlay.tsx
+++ b/packages/react-components/src/HelpOverlay.tsx
@@ -49,13 +49,13 @@ export default React.memo(styled(HelpOverlay)(({ theme }: ThemeProps) => `
color: ${theme.color};
cursor: pointer;
font-size: 2rem;
- padding: 1rem 1.5rem 0 0;
+ padding: 0.65rem 1.5rem 0 0;
}
> .help-button {
position: absolute;
right: 0rem;
- top: 0.125rem;
+ top: 0rem;
}
.help-slideout {
diff --git a/packages/react-components/src/Tabs/index.tsx b/packages/react-components/src/Tabs/index.tsx
index 0d3bb2e19b..6a14210cfe 100644
--- a/packages/react-components/src/Tabs/index.tsx
+++ b/packages/react-components/src/Tabs/index.tsx
@@ -73,7 +73,7 @@ export default React.memo(styled(Tabs)(({ theme }: ThemeProps) => `
margin: 0 auto;
width: 100%;
display: flex;
- padding: 1.5rem 1.5rem 0;
+ padding: 1.25rem 1.5rem 0;
}
&::-webkit-scrollbar {