@eperedo/calendar-hooks
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "@eperedo/calendar-hooks", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"main": "./src/hooks/index.js", | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
@@ -15,32 +15,23 @@ > Basic hooks for calendar components | ||
function MyCustomCalendar() { | ||
function CustomCalendar() { | ||
const [{ year, month, days }, changeDate] = useCalendar(new Date()); | ||
const [{ year, month, days }, changeDate] = useCalendar(new Date()); | ||
return ( | ||
<div> | ||
<div> | ||
Current Year: { year } | ||
</div> | ||
<div> | ||
Current Month: { month.name } | ||
</div> | ||
<div> | ||
{ | ||
days.map((day) => { | ||
return ( | ||
<button | ||
onClick={e => changeDate(day.date)} | ||
key={day.number}> | ||
{day.number} | ||
</button> | ||
) | ||
}); | ||
} | ||
</div> | ||
</div> | ||
); | ||
return ( | ||
<div> | ||
<div>Current Year: {year}</div> | ||
<div>Current Month: {month.name}</div> | ||
<div> | ||
{days.map((day) => { | ||
return ( | ||
<button onClick={(e) => changeDate(day.date)} key={day.number}> | ||
{day.number} | ||
</button> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
); | ||
} | ||
export default MyCustomCalendar; | ||
export default CustomCalendar; | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6523
7
37