refactor: update SingleDatePickerProps interface to separate color scheme type

This commit is contained in:
Astrian Zheng 2025-02-24 14:20:52 +11:00
parent 108d7e9910
commit bd4dd671ef
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -2,20 +2,17 @@
import { ref, defineProps, watch, onMounted, toRefs, getCurrentInstance } from 'vue'
import { generateUniqueId, applyColor, getL10Weekday, getCalendarDates } from '../utils'
interface SingleDatePickerProps {
colorScheme: {
mainColor: string
accentColor: string
borderColor: string
hoverColor: string
reversedColor: string
},
localization: string
interface SingleDatePickerPropsColorScheme {
mainColor: string
accentColor: string
borderColor: string
hoverColor: string
reversedColor: string
}
const props = defineProps({
colorScheme: {
type: Object as () => SingleDatePickerProps['colorScheme'],
type: Object as () => SingleDatePickerPropsColorScheme,
default: () => ({
mainColor: '#000000',
accentColor: '#000000',