• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mia-platform / design-system / 16112056302

07 Jul 2025 08:36AM UTC coverage: 97.858% (-0.03%) from 97.886%
16112056302

Pull #989

github

web-flow
Merge 1c7f1d840 into f3ac46274
Pull Request #989: feat: add code editor component

1100 of 1146 branches covered (95.99%)

Branch coverage included in aggregate %.

7 of 8 new or added lines in 3 files covered. (87.5%)

1732 of 1748 relevant lines covered (99.08%)

69.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/components/CodeEditor/CodeEditor.tsx
1
/**
2
 * Copyright 2025 Mia srl
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 *
16
 * SPDX-License-Identifier: Apache-2.0
17
 */
18

19
import { Editor } from 'react-live'
4✔
20
import { ReactElement } from 'react'
21

22
import { CodeEditorProps } from './props'
23
import styles from './CodeEditor.module.css'
4✔
24

25
export const CodeEditor = ({ code, onChange, language, isDisabled, theme }: CodeEditorProps): ReactElement => {
4✔
26
  return (
2✔
27
    <Editor
28
      className={styles.codeEditor}
29
      code={code}
30
      disabled={isDisabled}
31
      language={language}
32
      tabMode={'focus'}
33
      theme={theme}
NEW
34
      onChange={(newCode) => onChange(newCode)}
×
35
    />
36
  )
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc