Skip to content

Commit 867d10e

Browse files
committed
style: filename use kebab-case
1 parent 08ea755 commit 867d10e

File tree

12 files changed

+17
-13
lines changed

12 files changed

+17
-13
lines changed

src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { lazy, Suspense } from "react";
22
import { Allotment } from "allotment";
33
import "allotment/dist/style.css";
44

5-
import Header from "@/layout/Header";
5+
import RootHeader from "@/layout/root-header";
66
import { PlaygroundProvider } from "@/core/context/PlaygroundProvider";
77
import LazyLoading from "@/components/LazyLoading";
88
import { Toaster } from "./components/ui/sonner";
99

10-
const RootEditor = lazy(() => import("@/layout/RootEditor"));
11-
const RootPreview = lazy(() => import("@/layout/RootPreview"));
10+
const RootEditor = lazy(() => import("@/layout/root-editor"));
11+
const RootPreview = lazy(() => import("@/layout/root-preview"));
1212

1313
function App() {
1414
return (
1515
<div className='flex h-screen flex-col'>
16-
<Header />
16+
<RootHeader />
1717
<Toaster richColors position='top-right' />
1818

1919
<section className='flex-1'>
File renamed without changes.
File renamed without changes.

src/components/FileNameList/FileNameListItem.tsx renamed to src/components/filename-list/filename-list-item.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,13 @@ export default function FileNameListItem(props: FileNameListItemProps) {
109109
<AlertDialog open={open} onOpenChange={setOpen}>
110110
<AlertDialogContent>
111111
<AlertDialogHeader>
112-
<AlertDialogTitle>删除提醒</AlertDialogTitle>
112+
<AlertDialogTitle>操作提醒</AlertDialogTitle>
113113
<AlertDialogDescription>
114-
确定删除 <code>{delFileName}</code> ?
114+
是否删除
115+
<code className='relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono font-sesemibosemibold'>
116+
{delFileName}
117+
</code>
118+
?
115119
</AlertDialogDescription>
116120
</AlertDialogHeader>
117121
<AlertDialogFooter>

src/components/FileNameList/index.tsx renamed to src/components/filename-list/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PlaygroundContext } from "@/core/context";
22
import { useContext, useEffect, useMemo, useRef } from "react";
33
import { debounce } from "lodash-es";
4-
import FileNameListItem from "./FileNameListItem";
4+
import FileNameListItem from "./filename-list-item";
55
import { Plus } from "lucide-react";
66
import { ENTRY_FILE_NAME } from "@/core/files";
77

src/core/context/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CodeContainerFileInfo } from "@/components/CodeContainer";
1+
import type { CodeContainerFileInfo } from "@/components/code-container";
22
import { createContext } from "react";
33

44
export interface MultipleFiles {
File renamed without changes.

src/layout/RootEditor/index.tsx renamed to src/layout/root-editor/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { lazy, Suspense, useContext } from "react";
2-
import FileNameList from "@/components/FileNameList";
2+
import FileNameList from "@/components/filename-list";
33
import { PlaygroundContext } from "@/core/context";
44
import { debounce } from "lodash-es";
55
import LazyLoading from "@/components/LazyLoading";
66

7-
const CodeContainer = lazy(() => import("@/components/CodeContainer"));
7+
const CodeContainer = lazy(() => import("@/components/code-container"));
88

99
export default function RootEditor() {
1010
const { files = {}, setFiles, selectedFileName } = useContext(PlaygroundContext);

src/layout/Header/index.tsx renamed to src/layout/root-header/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ReactLogo from "@/icons/ReactLogo";
2-
export default function Header() {
1+
import ReactLogo from "@/icons/react-logo";
2+
export default function RootHeader() {
33
return (
44
<header className='flex items-center border-b p-2'>
55
<ReactLogo className='h-8 w-8' style={{ color: "#61DAFB" }} />

src/layout/RootPreview/compiler.ts renamed to src/layout/root-preview/compiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { transform } from "@babel/standalone";
22
import type { MultipleFiles } from "@/core/context";
33
import { ENTRY_FILE_NAME } from "@/core/files";
4-
import type { CodeContainerFileInfo } from "@/components/CodeContainer";
4+
import type { CodeContainerFileInfo } from "@/components/code-container";
55

66
type TransformOptions = Parameters<typeof transform>["1"];
77
type PluginItem = TransformOptions["plugins"];

0 commit comments

Comments
 (0)