feat: swap panel component (#51687)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Muhammed Mustafa
2023-10-14 01:52:53 +03:00
committed by GitHub
parent d2ab338c35
commit 87cea98d52
15 changed files with 68 additions and 119 deletions

View File

@@ -1,7 +1,8 @@
import { Panel } from '@freecodecamp/react-bootstrap';
import Prism from 'prismjs';
import React from 'react';
import { ChallengeFile } from '../../redux/prop-types';
import { Panel } from '@freecodecamp/ui';
import type { ChallengeFile } from '../../redux/prop-types';
type Props = {
challengeFiles: Solution[] | null;
@@ -25,7 +26,7 @@ function SolutionViewer({ challengeFiles, solution }: Props): JSX.Element {
return (
<>
{solutions.map(({ fileKey, ext, contents }) => (
<Panel bsStyle='primary' className='solution-viewer' key={fileKey}>
<Panel variant='primary' className='solution-viewer' key={fileKey}>
<Panel.Heading>{ext.toUpperCase()}</Panel.Heading>
<Panel.Body>
<pre>