update rich text toolbar styling
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
.stickyActive:not(.stickyAtBottom) {
|
.stickyActive:not(.stickyAtBottom) {
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
top: 64px !important;
|
top: 54px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stickyAtBottom {
|
.stickyAtBottom {
|
||||||
|
@ -163,6 +163,11 @@ export class Sticky extends Component {
|
|||||||
static propTypes = {
|
static propTypes = {
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* classNameActive: class to apply when Sticky is active.
|
||||||
|
*/
|
||||||
|
classNameActive: PropTypes.string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fillContainerWidth: allows the sticky width to be dynamically set to the width of it's
|
* fillContainerWidth: allows the sticky width to be dynamically set to the width of it's
|
||||||
* StickyContainer when sticky (fixed positioning).
|
* StickyContainer when sticky (fixed positioning).
|
||||||
@ -201,6 +206,7 @@ export class Sticky extends Component {
|
|||||||
styles.sticky,
|
styles.sticky,
|
||||||
{
|
{
|
||||||
[styles.stickyActive]: state.shouldStick,
|
[styles.stickyActive]: state.shouldStick,
|
||||||
|
[props.classNameActive]: state.shouldStick,
|
||||||
[styles.stickyAtBottom]: state.shouldStickAtBottom,
|
[styles.stickyAtBottom]: state.shouldStickAtBottom,
|
||||||
},
|
},
|
||||||
)}
|
)}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
--controlBGColor: #fff;
|
--controlBGColor: #fff;
|
||||||
--backgroundTertiaryColor: #fff;
|
--backgroundTertiaryColor: #fff;
|
||||||
--backgroundTertiaryColorDark: color(var(--backgroundTertiaryColor) lightness(90%));
|
--backgroundTertiaryColorDark: color(var(--backgroundTertiaryColor) lightness(90%));
|
||||||
|
--richTextEditorMinHeight: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.base {
|
.base {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
@import "../../../UI/theme";
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@ -6,6 +8,10 @@
|
|||||||
composes: editorControlBar from "../VisualEditor/index.css";
|
composes: editorControlBar from "../VisualEditor/index.css";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.editorControlBarSticky {
|
||||||
|
composes: editorControlBarSticky from "../VisualEditor/index.css";
|
||||||
|
}
|
||||||
|
|
||||||
.dragging { }
|
.dragging { }
|
||||||
|
|
||||||
.shim {
|
.shim {
|
||||||
@ -28,4 +34,5 @@
|
|||||||
.textarea {
|
.textarea {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
resize: none;
|
resize: none;
|
||||||
|
min-height: var(--richTextEditorMinHeight);
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,11 @@ export default class RawEditor extends React.Component {
|
|||||||
onDragOver={this.handleDragOver}
|
onDragOver={this.handleDragOver}
|
||||||
onDrop={this.handleDrop}
|
onDrop={this.handleDrop}
|
||||||
>
|
>
|
||||||
<Sticky className={styles.editorControlBar} fillContainerWidth>
|
<Sticky
|
||||||
|
className={styles.editorControlBar}
|
||||||
|
classNameActive={styles.editorControlBarSticky}
|
||||||
|
fillContainerWidth
|
||||||
|
>
|
||||||
<Toolbar
|
<Toolbar
|
||||||
selectionPosition={selectionPosition}
|
selectionPosition={selectionPosition}
|
||||||
onH1={this.handleHeader('#')}
|
onH1={this.handleHeader('#')}
|
||||||
@ -338,6 +342,7 @@ export default class RawEditor extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</Sticky>
|
</Sticky>
|
||||||
<TextareaAutosize
|
<TextareaAutosize
|
||||||
|
className={styles.textarea}
|
||||||
inputRef={this.handleRef}
|
inputRef={this.handleRef}
|
||||||
className={styles.textarea}
|
className={styles.textarea}
|
||||||
value={this.props.value || ''}
|
value={this.props.value || ''}
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
.editorControlBar {
|
.editorControlBar {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
border-top: 0;
|
||||||
|
background-color: var(--controlBGColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
.editorControlBarSticky {
|
||||||
|
border-color: var(--textFieldBorderColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor {
|
.editor {
|
||||||
@ -70,7 +77,7 @@
|
|||||||
border-radius: var(--borderRadius);
|
border-radius: var(--borderRadius);
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
border: 2px solid var(--textFieldBorderColor);
|
border: 2px solid var(--textFieldBorderColor);
|
||||||
min-height: 500px;
|
min-height: var(--richTextEditorMinHeight);
|
||||||
|
|
||||||
& ul,
|
& ul,
|
||||||
& ol {
|
& ol {
|
||||||
|
@ -275,7 +275,11 @@ export default class Editor extends Component {
|
|||||||
onDragOver={this.handleDragOver}
|
onDragOver={this.handleDragOver}
|
||||||
onDrop={this.handleDrop}
|
onDrop={this.handleDrop}
|
||||||
>
|
>
|
||||||
<Sticky className={styles.editorControlBar} fillContainerWidth>
|
<Sticky
|
||||||
|
className={styles.editorControlBar}
|
||||||
|
classNameActive={styles.editorControlBarSticky}
|
||||||
|
fillContainerWidth
|
||||||
|
>
|
||||||
<Toolbar
|
<Toolbar
|
||||||
selectionPosition={selectionPosition}
|
selectionPosition={selectionPosition}
|
||||||
onH1={this.handleHeader(1)}
|
onH1={this.handleHeader(1)}
|
||||||
|
Reference in New Issue
Block a user