From 4dedfa09ca59e54d1d5057d658db2c2644a19a45 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Tue, 23 Jan 2024 14:45:37 +0000 Subject: [PATCH] Scope component css to app class --- website/src/theme/ReactLiveScope/App.jsx | 22 ++-- website/src/theme/ReactLiveScope/index.jsx | 2 + website/src/theme/ReactLiveScope/styles.css | 138 ++++++++++---------- 3 files changed, 79 insertions(+), 83 deletions(-) diff --git a/website/src/theme/ReactLiveScope/App.jsx b/website/src/theme/ReactLiveScope/App.jsx index 78a27e1b4..8466ed8cd 100644 --- a/website/src/theme/ReactLiveScope/App.jsx +++ b/website/src/theme/ReactLiveScope/App.jsx @@ -5,16 +5,14 @@ import { P2pandaProvider } from './P2pandaContext'; import { MessageProvider } from './MessageContext'; import { Main } from './Main'; -import './styles.css'; - export const App = ({ children, header = '' }) => { - return ( - - - -
{children}
-
-
-
- ); - }; \ No newline at end of file + return ( + + + +
{children}
+
+
+
+ ); +}; diff --git a/website/src/theme/ReactLiveScope/index.jsx b/website/src/theme/ReactLiveScope/index.jsx index 54919a713..3c98c146b 100644 --- a/website/src/theme/ReactLiveScope/index.jsx +++ b/website/src/theme/ReactLiveScope/index.jsx @@ -2,6 +2,8 @@ import React from 'react'; import BrowserOnly from '@docusaurus/BrowserOnly'; +import './styles.css'; + export function App(props) { return ( ...}> diff --git a/website/src/theme/ReactLiveScope/styles.css b/website/src/theme/ReactLiveScope/styles.css index f454bfeaa..924015ee3 100644 --- a/website/src/theme/ReactLiveScope/styles.css +++ b/website/src/theme/ReactLiveScope/styles.css @@ -9,87 +9,83 @@ padding: 20px; } -.app, -.header, -.cafe-form { - h1, - h2, - h3 { - text-align: center; - } +.app h1, +.app h2, +.app h3 { + text-align: center; +} - h1 { - font-size: 50px; - margin: 0; - } +.app h1 { + font-size: 50px; + margin: 0; +} - h2 { - font-size: 20px; - } +.app h2 { + font-size: 20px; +} - input[type='submit'], - button { - padding: 10px; - outline: 0; - border: 0; - border-radius: 3px; - background-color: #6bd595; - cursor: pointer; - } +.app input[type='submit'], +.app button { + padding: 10px; + outline: 0; + border: 0; + border-radius: 3px; + background-color: #6bd595; + cursor: pointer; +} - input[disabled] { - background-color: #efefef; - color: #666; - cursor: default; - } +.app input[disabled] { + background-color: #efefef; + color: #666; + cursor: default; +} - fieldset { - border: 0; - padding: 0; - margin-top: 10px; - margin-bottom: 10px; - } +.app fieldset { + border: 0; + padding: 0; + margin-top: 10px; + margin-bottom: 10px; +} - label { - font-weight: bold; - display: block; - margin-bottom: 10px; - } +.app label { + font-weight: bold; + display: block; + margin-bottom: 10px; +} - textarea, - input[type='text'], - input[type='number'] { - width: 80%; - padding: 10px; - border-radius: 5px; - font-family: monospace; - border: #6bd595 2px solid; - } +.app textarea, +.app input[type='text'], +.app input[type='number'] { + width: 80%; + padding: 10px; + border-radius: 5px; + font-family: monospace; + border: #6bd595 2px solid; +} - label span { - font-weight: 400; - cursor: pointer; - } +.app label span { + font-weight: 400; + cursor: pointer; +} - .public-key { - text-align: center; - } +.public-key { + text-align: center; +} - .error { - border: rgb(146, 0, 49) solid; - } +.error { + border: rgb(146, 0, 49) solid; +} - .success { - border: rgb(0, 146, 44) solid; - } +.success { + border: rgb(0, 146, 44) solid; +} - .success, - .error { - margin: 10px; - padding-left: 20px; - padding-right: 20px; - border-radius: 20px; - max-height: 100px; - overflow: scroll; - } +.success, +.error { + margin: 10px; + padding-left: 20px; + padding-right: 20px; + border-radius: 20px; + max-height: 100px; + overflow: scroll; }