-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbb7734
commit 6f121a9
Showing
18 changed files
with
134 additions
and
98 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,52 +1,62 @@ | ||
function CreateButton() { | ||
return ( | ||
<button> | ||
<img className=" px-4" src="./images/PlusIcon.svg" /> | ||
</button> | ||
); | ||
} | ||
|
||
function DeleteButton() { | ||
return ( | ||
<button> | ||
<img className=" px-4" src="./images/DeleteIcon.svg" /> | ||
</button> | ||
); | ||
} | ||
|
||
function PauseButton() { | ||
return ( | ||
<button> | ||
<img className=" px-4" src="./images/PauseIcon.svg" /> | ||
</button> | ||
); | ||
} | ||
|
||
function PlayButton() { | ||
return ( | ||
<button> | ||
<img className=" px-4" src="./images/PlayIcon.svg" /> | ||
</button> | ||
); | ||
} | ||
|
||
export default function BranchRow(props: { | ||
creator: string; | ||
name: string; | ||
status: string; | ||
action: string; | ||
actionLabel: string; | ||
}) { | ||
const actionLabel = | ||
status === "No DB" ? "Create Database" : "Connect to Database"; | ||
|
||
return ( | ||
<div className="flex justify-between items-center py-3 px-12 shadow-inner"> | ||
<div className="flex justify-between items-center py-3 pl-12 pr-8 shadow-inner"> | ||
<span> | ||
{props.name} / {props.status} | ||
{props.creator} / {props.name} | ||
</span> | ||
<span> | ||
{props.status} /{" "} | ||
<a href="#" className="text-blue-500 hover:underline"> | ||
{props.actionLabel} | ||
{actionLabel} | ||
</a> | ||
</span> | ||
<button> | ||
<svg | ||
className="w-6 h-6 text-gray-500" | ||
fill="none" | ||
stroke="currentColor" | ||
viewBox="0 0 24 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth="2" | ||
d={`M${props.action}`} | ||
/> | ||
</svg> | ||
</button> | ||
<button> | ||
<svg | ||
className="w-6 h-6 text-red-500" | ||
fill="none" | ||
stroke="currentColor" | ||
viewBox="0 0 24 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth="2" | ||
d="M6 18L18 6M6 6l12 12" | ||
/> | ||
</svg> | ||
</button> | ||
<div className=" flex flex-row gap-4"> | ||
{props.status === "No DB" && <CreateButton />} | ||
{props.status === "Stopped" && <PlayButton />} | ||
{props.status === "Running" && <PauseButton />} | ||
{(props.status === "Running" || props.status === "Stopped") && ( | ||
<DeleteButton /> | ||
)} | ||
</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
Oops, something went wrong.