Skip to content

Commit

Permalink
[FIX] Add prefixed to mode classes
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejWas committed Jul 3, 2024
1 parent 0655766 commit f510d38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/MystEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ const EditorParent = styled.div`
${(props) => {
switch (props.mode) {
case "Preview":
return ".main-editor { display: none }";
return ".myst-main-editor { display: none }";
case "Source":
return ".preview { display: none }";
return ".myst-preview { display: none }";
case "Diff":
return ".main-editor { display: none }; .preview { display: none }";
return ".myst-main-editor { display: none }; .myst-preview { display: none }";
default:
return ``;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CodeMirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const CodeMirror = ({ text, id, name, mode, collaboration, spellcheckOpts, highl
}, [ready]);

return html`
<${CodeEditor} className="main-editor" ref=${editorMountpoint} $mode=${mode} id="${id}-editor">
<${CodeEditor} className="myst-main-editor" ref=${editorMountpoint} $mode=${mode} id="${id}-editor">
${error && html`<div class="editor-msg collab-error">No connection to the collaboration server</div>`}
${collaboration.enabled && !ready && !error && html`<div class="editor-msg collab-notif">Connecting to the collaboration server ...</div>`}
${collaboration.commentsEnabled && !error ? html`<${YCommentsParent} ycomments=${ycomments} />` : ""}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,6 @@ const Preview = styled.div`
}
}
`;
Preview.defaultProps = { className: "preview" };
Preview.defaultProps = { className: "myst-preview" };

export default Preview;

0 comments on commit f510d38

Please sign in to comment.