fix: update import path for SingleDatePicker and add type annotation to component
All checks were successful
Publish to npm / publish (push) Successful in 24s

This commit is contained in:
Astrian Zheng 2025-02-20 15:35:47 +11:00
parent 397103b636
commit d7feff5e37
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import React from 'react'
import { SingleDatePicker } from "../dist/index.es"
import { SingleDatePicker } from "../src/index"
import './app.scss'
export default () => {

View File

@ -80,7 +80,7 @@ export interface SingleDatePickerProps {
*
* @param {SingleDatePickerProps} props
*/
const SingleDatePicker: React.FC = ({ value, onSelect, localization, onClose, mainColor = '#000000', accentColor = '#000000', reversedColor = '#ffffff', hoverColor = '#00000017', borderColor = '#e0e0e0' }: SingleDatePickerProps) => {
const SingleDatePicker: React.FC<SingleDatePickerProps> = ({ value, onSelect, localization, onClose, mainColor = '#000000', accentColor = '#000000', reversedColor = '#ffffff', hoverColor = '#00000017', borderColor = '#e0e0e0' }: SingleDatePickerProps) => {
const [currentMonth, setCurrentMonth] = useState(new Date().getMonth())
const [currentYear, setCurrentYear] = useState(new Date().getFullYear())
const [selectedDate, setSelectedDate] = useState(new Date())