Skip to content

Commit

Permalink
Scope component css to app class
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreae committed Jan 23, 2024
1 parent 91c8a06 commit 4dedfa0
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 83 deletions.
22 changes: 10 additions & 12 deletions website/src/theme/ReactLiveScope/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<InitWasm>
<P2pandaProvider>
<MessageProvider>
<Main header={header}>{children}</Main>
</MessageProvider>
</P2pandaProvider>
</InitWasm>
);
};
return (
<InitWasm>
<P2pandaProvider>
<MessageProvider>
<Main header={header}>{children}</Main>
</MessageProvider>
</P2pandaProvider>
</InitWasm>
);
};
2 changes: 2 additions & 0 deletions website/src/theme/ReactLiveScope/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React from 'react';

import BrowserOnly from '@docusaurus/BrowserOnly';

import './styles.css';

export function App(props) {
return (
<BrowserOnly fallback={<div>...</div>}>
Expand Down
138 changes: 67 additions & 71 deletions website/src/theme/ReactLiveScope/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 4dedfa0

Please sign in to comment.