Skip to content

Commit

Permalink
fix(types): remove number type from Breakpoint['name' (#12113)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekkarczmarczyk committed Aug 25, 2020
1 parent c2734d3 commit 592aca5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/vuetify/src/mixins/mobile/index.ts
Expand Up @@ -9,8 +9,8 @@ export default Vue.extend({

props: {
mobileBreakpoint: {
type: [Number, String] as PropType<BreakpointName>,
default (): BreakpointName | undefined {
type: [Number, String] as PropType<number | BreakpointName>,
default (): number | BreakpointName | undefined {
// Avoid destroying unit
// tests for users
return this.$vuetify
Expand Down
6 changes: 3 additions & 3 deletions packages/vuetify/types/services/breakpoint.d.ts
@@ -1,5 +1,5 @@
// Types
export type BreakpointName = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl'
export type BreakpointName = 'xs' | 'sm' | 'md' | 'lg' | 'xl'

// Interfaces
export interface Breakpoint {
Expand All @@ -23,13 +23,13 @@ export interface Breakpoint {
xs: boolean
xsOnly: boolean
mobile: boolean
mobileBreakpoint: BreakpointName
mobileBreakpoint: number | BreakpointName
thresholds: BreakpointThresholds
scrollBarWidth: number
}

export interface BreakpointOptions {
mobileBreakpoint?: BreakpointName
mobileBreakpoint?: number | BreakpointName
scrollBarWidth?: number
thresholds?: Partial<BreakpointThresholds>
}
Expand Down

0 comments on commit 592aca5

Please sign in to comment.