νμ μ€ν¬λ¦½νΈλ‘ μμ±λ 리μ‘νΈ λ¬λ ₯ μ»΄ν¬λνΈμ λλ€.
peer dependencies
μ€μΉ
$ npm install --save @bbon/react-calendar
μ¬μ©
import React, { useCallback } from 'react';
import { Calendar } from '@bbon/react-calendar';
import '@bbon/react-calendar/dist/calendar.css';
const MyComponent = () => {
const handleChangeSelection = useCallback(
(start?: string, end?: string) => {
console.info('Selected dates: ', start, end);
},
[],
);
return (
<div>
<Calendar
useMoveToYear
useMoveToMonth
highlightToday
showDate
onChange={handleChangeSelection}
/>
</div>
);
}
λͺ¨μ
@bbon/react-calendar/dist/calendar.css
νμΌμ λ΄μ©μ νμΈνκ³ , μ€νμΌμ μ¬μ μν΄μ μ¬μ©νμ€ μ μμ΅λλ€.
μμ°
bbon.me: react-calendar λ‘ μ΄λν΄μ λμμ νμΈνμ€ μ μμ΅λλ€.
λ²λ€λ¬
Webpack μμ Rollup μΌλ‘ λ³κ²½νμ΅λλ€.
λ³κ²½μ¬μ λ μλμ κ°μ΅λλ€.
- νΈλ¦¬μμ΄νΉ (Tree-shaking) μ§μ
- CommonJS λͺ¨λκ³Ό ES λͺ¨λμ λͺ¨λ μ 곡