-
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
Showing
31 changed files
with
1,502 additions
and
133 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
47 changes: 47 additions & 0 deletions
47
web/admin/src/components/ui/UpdateStatusForm/UpdateStatusForm.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,47 @@ | ||
"use client"; | ||
|
||
import { FaRunning, FaRegStopCircle } from "react-icons/fa"; | ||
|
||
import { Button } from "@/components/ui/button"; | ||
|
||
type UpdateStatusFormProps = { | ||
isDisabledActive: boolean; | ||
isDisabledStop: boolean; | ||
handleUpdateStatusToActive: () => void; | ||
handleUpdateStatusToStop: () => void; | ||
}; | ||
|
||
export const UpdateStatusForm: React.FC<UpdateStatusFormProps> = ({ | ||
isDisabledActive, | ||
isDisabledStop, | ||
handleUpdateStatusToActive, | ||
handleUpdateStatusToStop, | ||
}) => { | ||
return ( | ||
<div className="flex items-center justify-between"> | ||
{/* active */} | ||
<div className="mr-2"> | ||
<Button | ||
disabled={isDisabledActive} | ||
variant="ghost" | ||
onClick={handleUpdateStatusToActive} | ||
> | ||
<FaRunning className="mr-1" /> | ||
<span className="text-xs">ACTIVE</span> | ||
</Button> | ||
</div> | ||
|
||
{/* stop */} | ||
<div> | ||
<Button | ||
disabled={isDisabledStop} | ||
variant="ghost" | ||
onClick={handleUpdateStatusToStop} | ||
> | ||
<FaRegStopCircle className="mr-1" /> | ||
<span className="text-xs">STOP</span> | ||
</Button> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./UpdateStatusForm"; |
2 changes: 1 addition & 1 deletion
2
web/admin/src/components/ui/loader.tsx → ...ponents/ui/loader/FadeLoaderComponent.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { FadeLoader } from "react-spinners"; | ||
|
||
export const Loader = () => { | ||
export const FadeLoaderComponent = () => { | ||
return <FadeLoader color="#36d7b7" className="inline-block" />; | ||
}; |
29 changes: 29 additions & 0 deletions
29
web/admin/src/components/ui/loader/SyncLoaderComponent.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,29 @@ | ||
import { FC } from "react"; | ||
import { SyncLoader } from "react-spinners"; | ||
|
||
type SyncLoaderComponentProps = { | ||
loading?: boolean; | ||
color?: string; | ||
speedMultiplier?: number; | ||
size?: number; | ||
margin?: number; | ||
}; | ||
|
||
export const SyncLoaderComponent: FC<SyncLoaderComponentProps> = ({ | ||
loading = true, | ||
color = "#36d7b7", | ||
speedMultiplier = 1, | ||
size = 15, | ||
margin = 2, | ||
}: SyncLoaderComponentProps) => { | ||
return ( | ||
<SyncLoader | ||
loading={loading} | ||
color={color} | ||
speedMultiplier={speedMultiplier} | ||
size={size} | ||
margin={margin} | ||
className="inline-block" | ||
/> | ||
); | ||
}; |
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,2 @@ | ||
export * from "./FadeLoaderComponent"; | ||
export * from "./SyncLoaderComponent"; |
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,5 @@ | ||
export const STATUS_LIST = [ | ||
{ value: 0, label: "all" }, | ||
{ value: 1, label: "active" }, | ||
{ value: 2, label: "stop" }, | ||
]; |
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.