Skip to content

Commit

Permalink
Export date range types
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 committed Dec 12, 2023
1 parent 23ba5b6 commit c25ef04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/DateRangeSelect/PDateRangeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@
import { getDateRangeLabel, getDateSpanLabel, isFullDateRange } from '@/components/DateRangeSelect/utilities'
import PIcon from '@/components/Icon/PIcon.vue'
import PPopOver from '@/components/PopOver/PPopOver.vue'
import { DateRange, DateRangeSelectValue } from '@/types/dateRange'
import { bottomRight, topRight, bottomLeft, topLeft, rightInside, leftInside } from '@/utilities/position'
type DateRange = { startDate: Date, endDate: Date }
export type DateRangeSelectSpanValue = { type: 'span', seconds: number }
export type DateRangeSelectRangeValue = { type: 'range', startDate: Date, endDate: Date }
export type DateRangeSelectValue = DateRangeSelectSpanValue | DateRangeSelectRangeValue | null | undefined
const props = defineProps<{
modelValue: DateRangeSelectValue,
placeholder?: string,
Expand Down
4 changes: 4 additions & 0 deletions src/types/dateRange.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export type DateRange = { startDate: Date, endDate: Date }
export type DateRangeSelectSpanValue = { type: 'span', seconds: number }
export type DateRangeSelectRangeValue = { type: 'range', startDate: Date, endDate: Date }
export type DateRangeSelectValue = DateRangeSelectSpanValue | DateRangeSelectRangeValue | null | undefined
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * from './attributes'
export * from './breadcrumbs'
export * from './buttonGroupOption'
export * from './checkbox'
export * from './dateRange'
export * from './drawer'
export * from './icon'
export * from './keyEvent'
Expand Down

0 comments on commit c25ef04

Please sign in to comment.