-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* volunter shift row * use theme border color * remove demo
- Loading branch information
1 parent
d3dee97
commit da88911
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
frontend/src/components/admin/schedule/VolunteerProfileShiftRow.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,46 @@ | ||
import React from "react"; | ||
import { Text, Box, VStack } from "@chakra-ui/react"; | ||
import { | ||
formatDateStringYear, | ||
formatTimeHourMinutes, | ||
} from "../../../utils/DateTimeUtils"; | ||
|
||
type VolunteerProfileShiftRowProps = { | ||
roleTitle: string; | ||
startDateTime: Date; | ||
endDateTime: Date; | ||
notes: string; | ||
}; | ||
const VolunteerProfileShiftRow = ({ | ||
roleTitle, | ||
startDateTime, | ||
endDateTime, | ||
notes, | ||
}: VolunteerProfileShiftRowProps): React.ReactElement => { | ||
return ( | ||
<Box borderWidth="1px" borderColor="background.dark"> | ||
<VStack | ||
justifyContent="start" | ||
align="start" | ||
py="12px" | ||
px="32px" | ||
spacing={0} | ||
> | ||
<Text textStyle="caption" fontWeight="semibold"> | ||
{roleTitle} | ||
</Text> | ||
<Text textStyle="caption"> | ||
{`${formatDateStringYear( | ||
startDateTime.toString(), | ||
)} | ${formatTimeHourMinutes(startDateTime)} - | ||
${formatTimeHourMinutes(endDateTime)}`} | ||
</Text> | ||
<Text textStyle="caption" color="gray"> | ||
{notes} | ||
</Text> | ||
</VStack> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default VolunteerProfileShiftRow; |
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