-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #449 from hotosm/feat/download-rotated-flight-plan
Feat/download rotated flight plan and project detail export
- Loading branch information
Showing
13 changed files
with
470 additions
and
127 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...d/src/components/DroneOperatorTask/DescriptionSection/DescriptionBox/ProgessBar/index.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,39 @@ | ||
interface IProgressBarProps { | ||
heading?: string; | ||
successCount?: number; | ||
totalCount?: number; | ||
} | ||
|
||
const ProgressBar = ({ | ||
heading = 'Uploading', | ||
successCount = 0, | ||
totalCount = 100, | ||
}: IProgressBarProps) => { | ||
const fillWidth = (successCount / totalCount) * 100; | ||
return ( | ||
<div className="naxatw-flex naxatw-flex-col naxatw-gap-2"> | ||
<div className="naxatw-flex naxatw-flex-col naxatw-items-start naxatw-self-stretch"> | ||
<p className="naxatw-flex naxatw-items-center naxatw-justify-start naxatw-gap-2 naxatw-text-[1.0625rem] naxatw-font-bold naxatw-leading-normal"> | ||
{heading} | ||
</p> | ||
</div> | ||
<div className="naxatw naxatw-flex naxatw-flex-col naxatw-items-start naxatw-gap-1 naxatw-self-stretch"> | ||
<p className="naxatw-text-[0.875rem] naxatw-text-[#7A7676]"> | ||
{totalCount === successCount && totalCount !== 0 ? ( | ||
<></> | ||
) : ( | ||
`${successCount} / ${totalCount} Completed` | ||
)} | ||
</p> | ||
<div className="naxatw-h-[0.75rem] naxatw-w-full naxatw-rounded-3xl naxatw-bg-gray-300"> | ||
<div | ||
className={`naxatw-h-[0.75rem] naxatw-animate-pulse naxatw-bg-[#D73F3F] ${fillWidth === 100 ? 'naxatw-rounded-3xl' : 'naxatw-rounded-l-3xl'} naxatw-transition-all`} | ||
style={{ width: `${fillWidth}%` }} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ProgressBar; |
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.