feat(client): remove inline values in GreenPass component (#48513)

feat/remove-inline-values-in-GreenPass-component
This commit is contained in:
Muhammed Mustafa
2022-12-16 10:59:04 -06:00
committed by GitHub
parent 35c3a93a72
commit 38a1204e2b
2 changed files with 3 additions and 12 deletions
@@ -53,6 +53,7 @@ textarea.inputarea {
.challenge-description-header {
display: flex;
gap: 7px;
}
.description-container h1 {
@@ -61,7 +62,7 @@ textarea.inputarea {
font-size: 1.1rem;
font-weight: 700;
line-height: 1.1;
margin: 0 0 0.6rem;
margin: 0.1em 0 0.6rem;
}
.description-highlighter {
@@ -72,7 +72,6 @@ import LowerJaw from './lower-jaw';
import './editor.css';
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
const MonacoEditor = Loadable(() => import('react-monaco-editor'));
interface EditorProps {
@@ -267,7 +266,6 @@ const Editor = (props: EditorProps): JSX.Element => {
noteIndex: number;
shouldPlay: boolean | undefined;
}>({
// eslint-disable-next-line no-undefined
sampler: undefined,
noteIndex: 0,
shouldPlay: store.get('fcc-sound') as boolean | undefined
@@ -493,7 +491,6 @@ const Editor = (props: EditorProps): JSX.Element => {
editor.addAction({
id: 'execute-challenge',
label: 'Run tests',
/* eslint-disable no-bitwise */
keybindings: [
monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter,
monaco.KeyMod.WinCtrl | monaco.KeyCode.Enter
@@ -738,14 +735,7 @@ const Editor = (props: EditorProps): JSX.Element => {
)}</span>`;
jawHeading.appendChild(challengeTitle);
const checkmark = ReactDOMServer.renderToStaticMarkup(
<GreenPass
hushScreenReaderText
style={{
height: '15px',
width: '15px',
marginLeft: '7px'
}}
/>
<GreenPass hushScreenReaderText />
);
const completedChallengeHeader = document.createElement('div');
completedChallengeHeader.innerHTML = checkmark;