From 2e02791818f64f7421d2284af026999204ef56e8 Mon Sep 17 00:00:00 2001 From: yz-yu Date: Thu, 21 Dec 2023 15:41:27 +0800 Subject: [PATCH 1/4] [Skip CI] vx.dev: init the PR --- preview-ui/src/Preview.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/preview-ui/src/Preview.jsx b/preview-ui/src/Preview.jsx index 9a64d69..ef0016a 100644 --- a/preview-ui/src/Preview.jsx +++ b/preview-ui/src/Preview.jsx @@ -1,3 +1 @@ -export default function VxDev() { - return

vx.dev

; -} +export default function VxDev() { return

vx.dev placeholder

; } \ No newline at end of file From 130389635b2edf465a6a49b36cae3ebb3958ee8f Mon Sep 17 00:00:00 2001 From: yz-yu Date: Thu, 21 Dec 2023 15:42:15 +0800 Subject: [PATCH 2/4] [vx.dev] prompt: { "prompt": "a weather app looks like the iOS weather app\r\nmake the background a blue gradient\n", "images": [] } --- preview-ui/src/Preview.jsx | 102 ++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/preview-ui/src/Preview.jsx b/preview-ui/src/Preview.jsx index ef0016a..04b15b8 100644 --- a/preview-ui/src/Preview.jsx +++ b/preview-ui/src/Preview.jsx @@ -1 +1,101 @@ -export default function VxDev() { return

vx.dev placeholder

; } \ No newline at end of file +import { useState } from 'react'; +import { ResponsiveBar } from "@nivo/bar"; +import { ArrowRight, CloudRain, Sun, Wind } from 'lucide-react'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; + +export default function WeatherApp() { + const [selectedDay, setSelectedDay] = useState('Today'); + + const days = [ + { name: 'Today', high: 76, low: 68, icon: }, + { name: 'Mon', high: 70, low: 65, icon: }, + { name: 'Tue', high: 75, low: 64, icon: }, + { name: 'Wed', high: 80, low: 70, icon: }, + { name: 'Thu', high: 78, low: 67, icon: }, + ]; + + const hourlyData = [ + { hour: 'Now', temperature: 76 }, + { hour: '1 PM', temperature: 75 }, + { hour: '2 PM', temperature: 74 }, + { hour: '3 PM', temperature: 73 }, + { hour: '4 PM', temperature: 72 }, + { hour: '5 PM', temperature: 71 }, + ]; + + return ( +
+
+

San Francisco

+

Mostly Sunny

+
+
76°
+ +
+ + + {days.map((day) => ( + setSelectedDay(day.name)} + className={`p-2 rounded-lg ${selectedDay === day.name ? 'bg-blue-700' : ''}`} + > + {day.icon} +
{day.name}
+
+ {day.high}° / {day.low}° +
+
+ ))} +
+
+
+ {hourlyData.map((data) => ( +
+
{data.hour}
+
{data.temperature}°
+
+ ))} +
+
+ ({ hour: data.hour, temperature: data.temperature }))} + keys={['temperature']} + indexBy="hour" + margin={{ top: 50, right: 50, bottom: 50, left: 60 }} + padding={0.3} + valueScale={{ type: 'linear' }} + indexScale={{ type: 'band', round: true }} + colors={{ scheme: 'nivo' }} + borderColor={{ from: 'color', modifiers: [['darker', 1.6]] }} + axisTop={null} + axisRight={null} + axisBottom={{ + tickSize: 5, + tickPadding: 5, + tickRotation: 0, + legend: 'Hour', + legendPosition: 'middle', + legendOffset: 32 + }} + axisLeft={{ + tickSize: 5, + tickPadding: 5, + tickRotation: 0, + legend: 'Temperature', + legendPosition: 'middle', + legendOffset: -40 + }} + labelSkipWidth={12} + labelSkipHeight={12} + labelTextColor={{ from: 'color', modifiers: [['darker', 1.6]] }} + animate={true} + motionStiffness={90} + motionDamping={15} + /> +
+
+
+ ); +} \ No newline at end of file From 9f3c8e2ea527c7175a3a46c841b9f49f4b26bb53 Mon Sep 17 00:00:00 2001 From: yz-yu Date: Thu, 21 Dec 2023 15:44:58 +0800 Subject: [PATCH 3/4] [vx.dev] prompt: { "prompt": "a weather app looks like the iOS weather app\r\nmake the background a blue gradient\nremove the bar chart, the inner content should have width 500px", "images": [] } --- preview-ui/src/Preview.jsx | 154 +++++++++++++++---------------------- 1 file changed, 62 insertions(+), 92 deletions(-) diff --git a/preview-ui/src/Preview.jsx b/preview-ui/src/Preview.jsx index 04b15b8..41510ef 100644 --- a/preview-ui/src/Preview.jsx +++ b/preview-ui/src/Preview.jsx @@ -1,99 +1,69 @@ -import { useState } from 'react'; -import { ResponsiveBar } from "@nivo/bar"; -import { ArrowRight, CloudRain, Sun, Wind } from 'lucide-react'; -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import React from 'react'; +import { AspectRatio } from "@/components/ui/aspect-ratio"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { WeatherIcon } from "lucide-react"; +import { ResponsiveLine } from "@nivo/line"; export default function WeatherApp() { - const [selectedDay, setSelectedDay] = useState('Today'); - - const days = [ - { name: 'Today', high: 76, low: 68, icon: }, - { name: 'Mon', high: 70, low: 65, icon: }, - { name: 'Tue', high: 75, low: 64, icon: }, - { name: 'Wed', high: 80, low: 70, icon: }, - { name: 'Thu', high: 78, low: 67, icon: }, - ]; - - const hourlyData = [ - { hour: 'Now', temperature: 76 }, - { hour: '1 PM', temperature: 75 }, - { hour: '2 PM', temperature: 74 }, - { hour: '3 PM', temperature: 73 }, - { hour: '4 PM', temperature: 72 }, - { hour: '5 PM', temperature: 71 }, - ]; - return ( -
-
-

San Francisco

-

Mostly Sunny

-
-
76°
- -
- - - {days.map((day) => ( - setSelectedDay(day.name)} - className={`p-2 rounded-lg ${selectedDay === day.name ? 'bg-blue-700' : ''}`} - > - {day.icon} -
{day.name}
-
- {day.high}° / {day.low}° +
+
+
+ + + San Francisco + CA, USA + + +
+
+ +
+
72°
+
Sunny
+
- - ))} - - -
- {hourlyData.map((data) => ( -
-
{data.hour}
-
{data.temperature}°
-
- ))} -
-
- ({ hour: data.hour, temperature: data.temperature }))} - keys={['temperature']} - indexBy="hour" - margin={{ top: 50, right: 50, bottom: 50, left: 60 }} - padding={0.3} - valueScale={{ type: 'linear' }} - indexScale={{ type: 'band', round: true }} - colors={{ scheme: 'nivo' }} - borderColor={{ from: 'color', modifiers: [['darker', 1.6]] }} - axisTop={null} - axisRight={null} - axisBottom={{ - tickSize: 5, - tickPadding: 5, - tickRotation: 0, - legend: 'Hour', - legendPosition: 'middle', - legendOffset: 32 - }} - axisLeft={{ - tickSize: 5, - tickPadding: 5, - tickRotation: 0, - legend: 'Temperature', - legendPosition: 'middle', - legendOffset: -40 - }} - labelSkipWidth={12} - labelSkipHeight={12} - labelTextColor={{ from: 'color', modifiers: [['darker', 1.6]] }} - animate={true} - motionStiffness={90} - motionDamping={15} - /> +
+
H: 77° L: 56°
+
10% chance of rain
+
+
+ +
+ +
+
+ +
From 5dddab9b4874050d4d13ccf14a5e77d0ef6d1d3b Mon Sep 17 00:00:00 2001 From: yz-yu Date: Thu, 21 Dec 2023 15:47:14 +0800 Subject: [PATCH 4/4] [vx.dev] prompt: { "prompt": "a weather app looks like the iOS weather app\r\nmake the background a blue gradient\nremove the bar chart, the inner content should have width 500px\n\"WeatherIcon\" is not exported by \"node_modules/lucide-react/dist/esm/lucide-react.js\",", "images": [] } --- preview-ui/src/Preview.jsx | 123 ++++++++++++++++++++----------------- 1 file changed, 67 insertions(+), 56 deletions(-) diff --git a/preview-ui/src/Preview.jsx b/preview-ui/src/Preview.jsx index 41510ef..b89d079 100644 --- a/preview-ui/src/Preview.jsx +++ b/preview-ui/src/Preview.jsx @@ -1,69 +1,80 @@ -import React from 'react'; import { AspectRatio } from "@/components/ui/aspect-ratio"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; -import { WeatherIcon } from "lucide-react"; import { ResponsiveLine } from "@nivo/line"; +import { Sun, CloudRain, Wind } from "lucide-react"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; export default function WeatherApp() { return (
-
- - - San Francisco - CA, USA - - -
-
- -
-
72°
-
Sunny
+
+ + + Today + This Week + + + + + San Francisco + Today, 5:00 PM + + +
+ +
72°
-
-
-
H: 77° L: 56°
-
10% chance of rain
-
-
- -
- -
+
+
+ + 10% +
+
+ + 6 mph +
+
+ + + + + + - - + +