mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-24 12:13:31 +08:00
feat(client): remove inline values in GreenPass component (#48513)
feat/remove-inline-values-in-GreenPass-component
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user