-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit introduces FullCalendar for our calendar's UI. It does not implement adding or removing absences from the calendar.
- Loading branch information
1 parent
2ae1b52
commit 7300a3a
Showing
5 changed files
with
326 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from 'react'; | ||
import { | ||
ButtonGroup, | ||
Button, | ||
IconButton, | ||
Flex, | ||
Heading, | ||
useTheme, | ||
} from '@chakra-ui/react'; | ||
import { | ||
ArrowBackIcon, | ||
ArrowForwardIcon, | ||
CalendarIcon, | ||
} from '@chakra-ui/icons'; | ||
|
||
interface CalendarHeaderProps { | ||
currentMonthYear: string; | ||
onTodayClick: () => void; | ||
onPrevClick: () => void; | ||
onNextClick: () => void; | ||
} | ||
|
||
const CalendarHeader: React.FC<CalendarHeaderProps> = ({ | ||
currentMonthYear, | ||
onTodayClick, | ||
onPrevClick, | ||
onNextClick, | ||
}) => { | ||
const theme = useTheme(); | ||
return ( | ||
<Flex marginBottom={theme.space[4]} alignItems="center"> | ||
<ButtonGroup isAttached variant="outline"> | ||
<IconButton | ||
colorScheme="blue" | ||
onClick={onPrevClick} | ||
icon={<ArrowBackIcon />} | ||
aria-label="Previous" | ||
/> | ||
<Button | ||
onClick={onTodayClick} | ||
variant="outline" | ||
colorScheme="blue" | ||
leftIcon={<CalendarIcon />} | ||
> | ||
Today | ||
</Button> | ||
<IconButton | ||
colorScheme="blue" | ||
onClick={onNextClick} | ||
icon={<ArrowForwardIcon />} | ||
aria-label="Next" | ||
/> | ||
</ButtonGroup> | ||
<Heading fontSize="xl" textAlign="center" marginX={theme.space[6]}> | ||
{currentMonthYear} | ||
</Heading> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export default CalendarHeader; |
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,27 @@ | ||
import React from 'react'; | ||
import { Flex, Box, Button, useTheme } from '@chakra-ui/react'; | ||
import { AddIcon } from '@chakra-ui/icons'; | ||
import { SistemaLogoColour } from '../components/SistemaLogoColour'; | ||
|
||
const CalendarSidebar: React.FC = () => { | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<Flex | ||
width="260px" | ||
padding={theme.space[4]} | ||
flexDirection="column" | ||
gap={theme.space[4]} | ||
alignItems="center" | ||
> | ||
<Box width="150px"> | ||
<SistemaLogoColour /> | ||
</Box> | ||
<Button colorScheme="blue" size="lg" leftIcon={<AddIcon />}> | ||
Declare Absence | ||
</Button> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export default CalendarSidebar; |
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