site: Improve code formatting in Previewer component (#40813)

- Remove unnecessary whitespace in the Demo.tsx file
- Replace `<style>` and `</style>` tags with empty strings in the index.css file
- Move the React import statement to the top of the index.js file

[.dumi/theme/builtins/Previewer/index.tsx]
- Remove unnecessary whitespace in the Demo.tsx file
- Replace `<style>` and `</style>` tags with empty strings in the index.css file
- Move the React import statement to the top of the index.js file
- Remove the unnecessary whitespace in the index.js file
This commit is contained in:
afc163 2023-02-20 11:20:37 +08:00 committed by GitHub
parent 853283b7e4
commit 0bfdff2086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,8 +315,7 @@ const CodePreviewer: React.FC<IPreviewerProps> = (props) => {
.replace('</style>', '') .replace('</style>', '')
.replace('<style>', ''); .replace('<style>', '');
const indexJsContent = ` const indexJsContent = `import React from 'react';
import React from 'react';
import { createRoot } from 'react-dom/client'; import { createRoot } from 'react-dom/client';
import Demo from './demo'; import Demo from './demo';