fix: minor style issues
This commit is contained in:
parent
616ce4a6f5
commit
4297c72dd0
6 changed files with 33 additions and 18 deletions
|
@ -58,7 +58,7 @@
|
||||||
"@babel/register": "^7.0.0",
|
"@babel/register": "^7.0.0",
|
||||||
"@hot-loader/react-dom": "16.8",
|
"@hot-loader/react-dom": "16.8",
|
||||||
"@lbry/color": "^1.0.2",
|
"@lbry/color": "^1.0.2",
|
||||||
"@lbry/components": "^2.2.4",
|
"@lbry/components": "^2.3.3",
|
||||||
"@types/three": "^0.93.1",
|
"@types/three": "^0.93.1",
|
||||||
"async-exit-hook": "^2.0.1",
|
"async-exit-hook": "^2.0.1",
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
|
|
|
@ -3,6 +3,7 @@ import * as React from 'react';
|
||||||
import ReactDOMServer from 'react-dom/server';
|
import ReactDOMServer from 'react-dom/server';
|
||||||
import MarkdownPreview from 'component/common/markdown-preview';
|
import MarkdownPreview from 'component/common/markdown-preview';
|
||||||
import SimpleMDE from 'react-simplemde-editor';
|
import SimpleMDE from 'react-simplemde-editor';
|
||||||
|
// For now I just added them in the markdown-editor scss file
|
||||||
import 'easymde/dist/easymde.min.css';
|
import 'easymde/dist/easymde.min.css';
|
||||||
import Toggle from 'react-toggle';
|
import Toggle from 'react-toggle';
|
||||||
import { openEditorMenu, stopContextMenu } from 'util/context-menu';
|
import { openEditorMenu, stopContextMenu } from 'util/context-menu';
|
||||||
|
@ -85,7 +86,7 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
input = (
|
input = (
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<radio-element>
|
<radio-element>
|
||||||
<input id={name} type='radio' {...inputProps} />
|
<input id={name} type="radio" {...inputProps} />
|
||||||
<label htmlFor={name}>{label}</label>
|
<label htmlFor={name}>{label}</label>
|
||||||
<radio-toggle onClick={inputProps.onChange} />
|
<radio-toggle onClick={inputProps.onChange} />
|
||||||
</radio-element>
|
</radio-element>
|
||||||
|
@ -99,7 +100,7 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
input = (
|
input = (
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<checkbox-element {...elementProps}>
|
<checkbox-element {...elementProps}>
|
||||||
<input id={name} type='checkbox' {...inputProps} />
|
<input id={name} type="checkbox" {...inputProps} />
|
||||||
<label htmlFor={name}>{label}</label>
|
<label htmlFor={name}>{label}</label>
|
||||||
<checkbox-toggle onClick={inputProps.onChange} />
|
<checkbox-toggle onClick={inputProps.onChange} />
|
||||||
</checkbox-element>
|
</checkbox-element>
|
||||||
|
@ -129,13 +130,13 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
};
|
};
|
||||||
|
|
||||||
input = (
|
input = (
|
||||||
<div className='form-field--SimpleMDE' onContextMenu={stopContextMenu}>
|
<div className="form-field--SimpleMDE" onContextMenu={stopContextMenu}>
|
||||||
<fieldset-section>
|
<fieldset-section>
|
||||||
<label htmlFor={name}>{label}</label>
|
<label htmlFor={name}>{label}</label>
|
||||||
<SimpleMDE
|
<SimpleMDE
|
||||||
{...inputProps}
|
{...inputProps}
|
||||||
id={name}
|
id={name}
|
||||||
type='textarea'
|
type="textarea"
|
||||||
events={handleEvents}
|
events={handleEvents}
|
||||||
options={{
|
options={{
|
||||||
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side'],
|
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side'],
|
||||||
|
@ -169,10 +170,10 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<fieldset-section>
|
<fieldset-section>
|
||||||
<label htmlFor={name}>
|
<label htmlFor={name}>
|
||||||
{errorMessage ? <span className='error-text'>{errorMessage}</span> : label}
|
{errorMessage ? <span className="error-text">{errorMessage}</span> : label}
|
||||||
</label>
|
</label>
|
||||||
{prefix && (
|
{prefix && (
|
||||||
<label className='form-field--inline-prefix' htmlFor={name}>
|
<label className="form-field--inline-prefix" htmlFor={name}>
|
||||||
{prefix}
|
{prefix}
|
||||||
</label>
|
</label>
|
||||||
)}
|
)}
|
||||||
|
@ -187,7 +188,7 @@ export class FormField extends React.PureComponent<Props> {
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{input}
|
{input}
|
||||||
|
|
||||||
{helper && <div className='form-field__help'>{helper}</div>}
|
{helper && <div className="form-field__help">{helper}</div>}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
button {
|
||||||
color: $lbry-black;
|
color: $lbry-black;
|
||||||
|
border-color: transparent;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
|
|
||||||
&:not(.active),
|
&:not(.active),
|
||||||
|
@ -82,7 +83,6 @@
|
||||||
|
|
||||||
&.active,
|
&.active,
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: transparent;
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
html[data-mode='dark'] & {
|
html[data-mode='dark'] & {
|
||||||
background-color: rgba($lbry-white, 0.2);
|
background-color: rgba($lbry-white, 0.2);
|
||||||
|
|
||||||
a {
|
button {
|
||||||
color: $lbry-white !important; // We need to use !important to override the CodeMirror styles
|
color: $lbry-white !important; // We need to use !important to override the CodeMirror styles
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
|
@ -107,12 +107,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled-for-preview {
|
&.disabled-for-preview {
|
||||||
a:not(.no-disable) {
|
button:not(.no-disable) {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The markdown preview button is highlighted during preview when the other buttons are disabled
|
// The markdown preview button is highlighted during preview when the other buttons are disabled
|
||||||
a.no-disable {
|
button.no-disable {
|
||||||
background-color: rgba($lbry-white, 0.3);
|
background-color: rgba($lbry-white, 0.3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,4 +131,18 @@
|
||||||
|
|
||||||
.form-field--SimpleMDE {
|
.form-field--SimpleMDE {
|
||||||
margin-top: var(--spacing-vertical-large);
|
margin-top: var(--spacing-vertical-large);
|
||||||
|
|
||||||
|
// Overriding the lbry/components form styling
|
||||||
|
.editor-toolbar {
|
||||||
|
button:not(.button) {
|
||||||
|
padding-right: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
background-color: transparent !important;
|
||||||
|
border: transparent;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $lbry-white !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
table {
|
table {
|
||||||
margin-bottom: 1.2rem;
|
margin-bottom: 1.2rem;
|
||||||
padding: var(--spacing-vertical-medium);
|
padding: var(--spacing-vertical-medium);
|
||||||
background-color: $lbry-white;
|
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
td,
|
td,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
@import '~@lbry/components/sass/table/_index.scss';
|
@import '~@lbry/components/sass/table/_index.scss';
|
||||||
|
|
||||||
|
table,
|
||||||
.table {
|
.table {
|
||||||
[data-mode='dark'] & {
|
[data-mode='dark'] & {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
|
@ -803,10 +803,10 @@
|
||||||
resolved "https://registry.yarnpkg.com/@lbry/color/-/color-1.1.0.tgz#00d9474de64bafa507d07f137dbe5754ee65c4e6"
|
resolved "https://registry.yarnpkg.com/@lbry/color/-/color-1.1.0.tgz#00d9474de64bafa507d07f137dbe5754ee65c4e6"
|
||||||
integrity sha512-wtFrKk3wWLcqbbjVMU87yEXsiRkUWHNzsZPspFI0dNX5uzprES1L3ONLwBwtrIkEYDHtszs8+eFDQZdJC6whfw==
|
integrity sha512-wtFrKk3wWLcqbbjVMU87yEXsiRkUWHNzsZPspFI0dNX5uzprES1L3ONLwBwtrIkEYDHtszs8+eFDQZdJC6whfw==
|
||||||
|
|
||||||
"@lbry/components@^2.2.4":
|
"@lbry/components@^2.3.3":
|
||||||
version "2.2.5"
|
version "2.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/@lbry/components/-/components-2.2.5.tgz#61d27e99fef18cd494a2daafb7d522880e02cf60"
|
resolved "https://registry.yarnpkg.com/@lbry/components/-/components-2.3.3.tgz#c9804703a5db9a23b5185cbc9849a287cb47bea6"
|
||||||
integrity sha512-RPGJvY9HuaK0YtIBompHr67RquCXwqi1QKt1gqSqUGnv+vaMS2S0Vj5Jw4Tf9U2cLEfYt9j9GGiRpBXWEsYjIw==
|
integrity sha512-AaR0lYxNG/UlWr6UMl5bylwoGNaqV/NhzomVBtuDmQH3tJ9WbUNrDHFC86F5N/ZyejnhdA+aGyb4KyLmwrzkBg==
|
||||||
|
|
||||||
"@mapbox/hast-util-table-cell-style@^0.1.3":
|
"@mapbox/hast-util-table-cell-style@^0.1.3":
|
||||||
version "0.1.3"
|
version "0.1.3"
|
||||||
|
|
Loading…
Reference in a new issue