Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

improve sidebar visual style

Abi Rajaa126c37ed38a
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index a97ef14a..81a2dc7a 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -8,6 +8,7 @@ import classNames from "classnames";
import { FaDownload, FaUndo } from "react-icons/fa";
import { Button } from "@/components/ui/button";
import { Textarea } from "@/components/ui/textarea";
+import { Separator } from "@/components/ui/separator";
function App() {
const [appState, setAppState] = useState<"INITIAL" | "CODING" | "CODE_READY">(
@@ -101,18 +102,24 @@ function App() {
<CodePreview code={generatedCode} />
</div>
)}
- <div className="flex gap-x-2">
- <div
- className={classNames({
- "scanning relative": appState === "CODING",
- })}
- >
- <img
- className="w-[340px]"
- src={referenceImages[0]}
- alt="Reference"
- />
+ <div className="flex gap-x-2 mt-2">
+ <div className="flex flex-col">
+ <div
+ className={classNames({
+ "scanning relative": appState === "CODING",
+ })}
+ >
+ <img
+ className="w-[340px] border border-gray-200 rounded-md"
+ src={referenceImages[0]}
+ alt="Reference"
+ />
+ </div>
+ <div className="text-gray-400 uppercase text-sm text-center mt-1">
+ Original Screenshot
+ </div>
</div>
+
<div className="bg-gray-400 px-4 py-2 rounded text-sm hidden">
<h2 className="text-lg mb-4 border-b border-gray-800">
Console
@@ -128,11 +135,13 @@ function App() {
</div>
</div>
+ <Separator className="mt-1 mb-2" />
+
{appState === "CODE_READY" && (
<div>
<div className="grid w-full gap-2">
<Textarea
- placeholder="Describe what the AI missed the first time around"
+ placeholder="Tell the AI what to change..."
onChange={(e) => setUpdateInstruction(e.target.value)}
value={updateInstruction}
/>
diff --git a/frontend/src/components/ui/separator.tsx b/frontend/src/components/ui/separator.tsx
new file mode 100644
index 00000000..6d7f1226
--- /dev/null
+++ b/frontend/src/components/ui/separator.tsx
@@ -0,0 +1,29 @@
+import * as React from "react"
+import * as SeparatorPrimitive from "@radix-ui/react-separator"
+
+import { cn } from "@/lib/utils"
+
+const Separator = React.forwardRef<
+ React.ElementRef<typeof SeparatorPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
+>(
+ (
+ { className, orientation = "horizontal", decorative = true, ...props },
+ ref
+ ) => (
+ <SeparatorPrimitive.Root
+ ref={ref}
+ decorative={decorative}
+ orientation={orientation}
+ className={cn(
+ "shrink-0 bg-border",
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
+ className
+ )}
+ {...props}
+ />
+ )
+)
+Separator.displayName = SeparatorPrimitive.Root.displayName
+
+export { Separator }