There is a block of code in the src/react/Calendar/Calendar.tsx file that is used to display the days of week. e.g S, M, T, W, T, F, S this code block is currently hardcoded into the return statement of the Calendar component.
We should modify this bit to live as a customizable component that library users can define themselves. Same as the dayComponent prop we already have defined in this file.
This is the block that should be extracted from the return statement
There is a block of code in the
src/react/Calendar/Calendar.tsx
file that is used to display the days of week. e.gS, M, T, W, T, F, S
this code block is currently hardcoded into thereturn
statement of theCalendar
component.We should modify this bit to live as a customizable component that library users can define themselves. Same as the
dayComponent
prop we already have defined in this file.This is the block that should be extracted from the return statement
Tasks
CalendarProps
interface calleddayNameComponent
that allows users to customize the Day Names componentsdayNameComponent
prop is not provided by the user, assign the default code block shard above. ☝dayNameComponent
prop is provided by the user, map over the days of the week and render the customdayNameComponent
for each day.