This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Convert fixtures to TSX instead of JSX
- Loading branch information
Showing
38 changed files
with
225 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { GoArrowRight } from "react-icons/go"; | ||
import { PiNumberCircleOneFill, PiNumberCircleTwoFill } from "react-icons/pi"; | ||
|
||
export interface BeforeAfterCodeLayoutProps { | ||
before: React.ReactNode; | ||
after: React.ReactNode; | ||
} | ||
|
||
export function BeforeAfterCodeLayout({ | ||
before, | ||
after, | ||
}: BeforeAfterCodeLayoutProps) { | ||
return ( | ||
<div className="grid xl:grid-rows-1 xl:grid-cols-beforeAfterCodingBlocks grid-cols-1 grid-row-2 gap-4 w-full mt-6"> | ||
<div> | ||
<div className="mockup-browser bg-gray-200 border dark:bg-gray-800 dark:border-gray-700"> | ||
<div className="mockup-browser-toolbar"> | ||
<div className="text-center font-bold flex-1 pr-20"> | ||
<div className="flex items-center justify-center gap-2"> | ||
<PiNumberCircleOneFill size={18} /> Input Code | ||
</div> | ||
</div> | ||
</div> | ||
{before} | ||
</div> | ||
</div> | ||
|
||
<div className="items-center hidden xl:flex"> | ||
<div className="relative"> | ||
<GoArrowRight | ||
className="dark:text-gray-100 text-gray-500 absolute left-1/2 -translate-x-1/3" | ||
size={34} | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<div className="mockup-browser bg-gray-200 border dark:bg-gray-800 dark:border-gray-700"> | ||
<div className="mockup-browser-toolbar"> | ||
<div className="text-center font-bold flex-1 pr-20"> | ||
<div className="flex items-center justify-center gap-2"> | ||
<PiNumberCircleTwoFill size={18} /> React Unforget Result | ||
</div> | ||
</div> | ||
</div> | ||
{after} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...compiler/src/tests/fixtures/fixture_1.jsx → ...compiler/src/tests/fixtures/fixture_1.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import React from "react"; | ||
|
||
export default function SimpleJSX() { | ||
return <p>Hello world!</p>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...ompiler/src/tests/fixtures/fixture_11.jsx → ...ompiler/src/tests/fixtures/fixture_11.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import React from "react"; | ||
|
||
export default function App() { | ||
const a = []; | ||
a.push(1); | ||
|
Oops, something went wrong.