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