mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2025-09-17 04:59:35 +08:00
Refactor status text color function and finalized transactionpdf component
This commit is contained in:
parent
db8b93a7db
commit
b9bf114904
4 changed files with 127 additions and 80 deletions
18
src/Components/StatusTextColor/StatusTextColor.tsx
Normal file
18
src/Components/StatusTextColor/StatusTextColor.tsx
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { colors } from "../../styles";
|
||||
|
||||
export default function StatusTextColor(status: string) {
|
||||
if (
|
||||
status === "Pending Approval" ||
|
||||
status === "Returned: Pending Checking"
|
||||
) {
|
||||
return colors.orange;
|
||||
} else if (
|
||||
status === "Approved" ||
|
||||
status === "Finalized" ||
|
||||
status === "Borrowed"
|
||||
) {
|
||||
return colors.green;
|
||||
} else {
|
||||
return colors.red;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue