-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Glen <glen.84@gmail.com> Co-authored-by: Andrew Henry <AMajesticPotatoe@gmail.com> Co-authored-by: nekosaur <albert@kaaman.nu> Co-authored-by: Kael <kaelwd@gmail.com>
- Loading branch information
1 parent
a804438
commit a8dba4f
Showing
19 changed files
with
1,155 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"props": { | ||
"height": "This value is the current window height.", | ||
"lg": "This value indicates that the device width is between the **md** and **lg** threshold values.", | ||
"lgAndDown": "This value indicates that the device width is less than the **lg** threshold value.", | ||
"lgAndUp": "This value indicates that the device width is greater than the **lg** threshold value.", | ||
"md": "This value indicates that the device width is between the **sm** and **md** threshold values.", | ||
"mdAndDown": "This value indicates that the device width is less than the **md** threshold value.", | ||
"mdAndUp": "This value indicates that the device width is greater than the **md** threshold value.", | ||
"mobile": "This value indicates whether the current display width is less than the defined [mobileBreakpoint](#mobile-breakpoint)", | ||
"mobileBreakpoint": "This value indicates whether the current display width is less than the defined [mobileBreakpoint](#mobile-breakpoint)", | ||
"name": "The name key correlates to the currently active breakpoint; e.g. **xs**, **sm**, **md**, **lg**, **xl**, **xxl**.", | ||
"platform": "This object contains information from the detected device's [userAgent](https://developer.mozilla.org/en-US/docs/Web/API/NavigatorID/userAgent) and whether it supports **touch**.", | ||
"sm": "This value indicates that the device width is between the **xs** and **sm** threshold values.", | ||
"smAndDown": "This value indicates that the device width is less than the **sm** threshold value.", | ||
"smAndUp": "This value indicates that the device width is greater than the **sm** threshold value.", | ||
"thresholds": "This object is used for device viewport calculations.", | ||
"width": "This value is the current window width.", | ||
"xl": "This value indicates that the device width is between the **lg** and **xl** threshold values.", | ||
"xlAndDown": "This value indicates that the device width is less than the **xl** threshold value.", | ||
"xlAndUp": "This value indicates that the device width is greater than the **xl** threshold value.", | ||
"xs": "This value indicates that the device width greater than the **xs** threshold value.", | ||
"xxl": "This value indicates that the device width is greater than the **xl** threshold value." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
module.exports = { | ||
display: { | ||
props: [ | ||
{ | ||
name: 'height', | ||
type: 'number', | ||
default: 0, | ||
}, | ||
{ | ||
name: 'lg', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'lgAndDown', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'lgAndUp', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'md', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'mdAndDown', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'mdAndUp', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'mobile', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'mobileBreakpoint', | ||
type: 'number | string', | ||
default: 'md', | ||
}, | ||
{ | ||
name: 'name', | ||
type: 'string', | ||
default: '', | ||
}, | ||
{ | ||
name: 'platform', | ||
type: 'object', | ||
default: { | ||
android: false, | ||
ios: false, | ||
cordova: false, | ||
electron: false, | ||
edge: false, | ||
firefox: false, | ||
opera: false, | ||
win: false, | ||
mac: false, | ||
linux: false, | ||
touch: false, | ||
ssr: false, | ||
}, | ||
}, | ||
{ | ||
name: 'sm', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'smAndDown', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'smAndUp', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'thresholds', | ||
type: 'object', | ||
default: { | ||
xs: 0, | ||
sm: 600, | ||
md: 960, | ||
lg: 1280, | ||
xl: 1920, | ||
xxl: 2560, | ||
}, | ||
snippet: ` | ||
// Composables | ||
import { useDisplay } from 'vuetify/lib/composables/display' | ||
export default { | ||
mounted () { | ||
const display = useDisplay() | ||
// display thresholds are not reactive | ||
// and do not need to use .value | ||
console.log(display.thresholds.md) // 1280 | ||
} | ||
} | ||
`, | ||
}, | ||
{ | ||
name: 'width', | ||
type: 'number', | ||
default: 0, | ||
}, | ||
{ | ||
name: 'xl', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'xlAndDown', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'xlAndUp', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'xs', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
{ | ||
name: 'xxl', | ||
type: 'boolean', | ||
default: 'false', | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.