-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Project + Settings page UI (#381)
--------- Co-authored-by: Daniel R Farrell <[email protected]>
- Loading branch information
Showing
10 changed files
with
491 additions
and
37 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import * as React from 'react'; | ||
|
||
import { cn } from '@/lib/utils'; | ||
|
||
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>( | ||
({ className, ...props }, ref) => ( | ||
<div | ||
ref={ref} | ||
className={cn('rounded-xl border bg-card text-card-foreground shadow', className)} | ||
{...props} | ||
/> | ||
), | ||
); | ||
Card.displayName = 'Card'; | ||
|
||
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>( | ||
({ className, ...props }, ref) => ( | ||
<div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} /> | ||
), | ||
); | ||
CardHeader.displayName = 'CardHeader'; | ||
|
||
const CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>( | ||
({ className, ...props }, ref) => ( | ||
<h3 | ||
ref={ref} | ||
className={cn('font-semibold leading-none tracking-tight', className)} | ||
{...props} | ||
/> | ||
), | ||
); | ||
CardTitle.displayName = 'CardTitle'; | ||
|
||
const CardDescription = React.forwardRef< | ||
HTMLParagraphElement, | ||
React.HTMLAttributes<HTMLParagraphElement> | ||
>(({ className, ...props }, ref) => ( | ||
<p ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} /> | ||
)); | ||
CardDescription.displayName = 'CardDescription'; | ||
|
||
const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>( | ||
({ className, ...props }, ref) => ( | ||
<div ref={ref} className={cn('p-6 pt-0', className)} {...props} /> | ||
), | ||
); | ||
CardContent.displayName = 'CardContent'; | ||
|
||
const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>( | ||
({ className, ...props }, ref) => ( | ||
<div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} /> | ||
), | ||
); | ||
CardFooter.displayName = 'CardFooter'; | ||
|
||
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }; |
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
app/src/routes/projects/ProjectsTab/Create/LoadProject.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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { ProjectData } from '.'; | ||
|
||
// Step components for "Load existing project" path | ||
export const LoadStep1 = ({ | ||
formData, | ||
setProjectData, | ||
}: { | ||
formData: ProjectData; | ||
setProjectData: (data: ProjectData) => void; | ||
}) => ( | ||
<div className="space-y-4"> | ||
<h2 className="text-xl font-bold">Step 1: Select Project</h2> | ||
<input | ||
type="text" | ||
placeholder="Project Name" | ||
value={formData.projectName} | ||
onChange={(e) => setProjectData({ ...formData, projectName: e.target.value })} | ||
className="w-full p-2 border rounded" | ||
/> | ||
</div> | ||
); | ||
|
||
export const LoadStep2 = ({ | ||
formData, | ||
setProjectData, | ||
}: { | ||
formData: ProjectData; | ||
setProjectData: (data: ProjectData) => void; | ||
}) => ( | ||
<div className="space-y-4"> | ||
<h2 className="text-xl font-bold">Step 2: Configure</h2> | ||
<select | ||
value={formData.projectType} | ||
onChange={(e) => setProjectData({ ...formData, projectType: e.target.value })} | ||
className="w-full p-2 border rounded" | ||
> | ||
<option value="">Select Project Type</option> | ||
<option value="react">React</option> | ||
<option value="vue">Vue</option> | ||
<option value="angular">Angular</option> | ||
</select> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { ProjectData } from '.'; | ||
|
||
// Step components for "New Onlook project" path | ||
export const NewStep1 = ({ | ||
formData, | ||
setProjectData, | ||
}: { | ||
formData: ProjectData; | ||
setProjectData: (data: ProjectData) => void; | ||
}) => ( | ||
<div className="space-y-4"> | ||
<h2 className="text-xl font-bold">Step 1: Project Details</h2> | ||
<input | ||
type="text" | ||
placeholder="Project Name" | ||
value={formData.projectName} | ||
onChange={(e) => setProjectData({ ...formData, projectName: e.target.value })} | ||
className="w-full p-2 border rounded" | ||
/> | ||
<input | ||
type="text" | ||
placeholder="Description" | ||
value={formData.description} | ||
onChange={(e) => setProjectData({ ...formData, description: e.target.value })} | ||
className="w-full p-2 border rounded" | ||
/> | ||
</div> | ||
); | ||
|
||
export const NewStep2 = ({ | ||
formData, | ||
setProjectData, | ||
}: { | ||
formData: ProjectData; | ||
setProjectData: (data: ProjectData) => void; | ||
}) => ( | ||
<div className="space-y-4"> | ||
<h2 className="text-xl font-bold">Step 2: React Setup</h2> | ||
<select | ||
value={formData.reactVersion} | ||
onChange={(e) => setProjectData({ ...formData, reactVersion: e.target.value })} | ||
className="w-full p-2 border rounded" | ||
> | ||
<option value="">Select React Version</option> | ||
<option value="18">React 18</option> | ||
<option value="17">React 17</option> | ||
<option value="16">React 16</option> | ||
</select> | ||
</div> | ||
); |
Oops, something went wrong.