Skip to content

Commit 1713d75

Browse files
authored
Merge pull request #74 from sparrow-js/custom-template
fix shadcn/ui
2 parents 90f56c1 + 76463de commit 1713d75

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

engine/apps/react-shadcnui/src/App.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ export default {
22
'/src/App.jsx': `
33
import ErrorBoundary from "./ErrorBoundary.jsx";
44
import Preview from "./Preview.jsx";
5+
import { TooltipProvider } from "components/ui/tooltip";
56
67
export default function Home() {
78
return (
8-
<main className="vx-dev-wrapper relative">
9-
<ErrorBoundary>
10-
<Preview />
11-
</ErrorBoundary>
12-
</main>
9+
<TooltipProvider>
10+
<main className="vx-dev-wrapper relative">
11+
<ErrorBoundary>
12+
<Preview />
13+
</ErrorBoundary>
14+
</main>
15+
</TooltipProvider>
1316
);
1417
}
1518
`,

public/prompts/shadcn-ui.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ Also there is no need to consider the length or complexity of the generated code
9090
Use semantic HTML elements and aria attributes to ensure the accessibility of results, and more. Also need to use Tailwind to adjust spacing, margins and padding between elements, especially when using elements like `main` or `div`. Also need to make sure to rely on default styles as much as possible and avoid adding color to components without explicitly telling them to do so.
9191
No need to import tailwind.css.
9292

93-
- For images, use placeholder images from https://www.ancodeai.com/placeholder.svg and include a detailed description of the image in the alt text so that an image generation AI can generate the image later.
94-
93+
If you have any images, load them from Unsplash or use solid colored rectangles as placeholders.
9594

9695
Your prototype should look and feel much more complete and advanced than the wireframes provided. Flesh it out, make it real! Try your best to figure out what the designer wants and make it happen. If there are any questions or underspecified features, use what you know about applications, user experience, and website design patterns to "fill in the blanks". If you're unsure of how the designs should work, take a guess—it's better for you to get it wrong than to leave things incomplete.
9796

0 commit comments

Comments
 (0)