-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
7,162 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
dist/ |
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 @@ | ||
src/ |
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,51 @@ | ||
# vue-md-breakpoint | ||
|
||
Access the current breakpoint from the material design spec inside a Vue app. | ||
Resizing the browser will update the breakpoint accordingly. | ||
|
||
## Demo | ||
|
||
[](https://codesandbox.io/s/n7nj0p76ml) | ||
|
||
## Installation | ||
|
||
npm install vue-md-breakpoint | ||
# or: | ||
yarn add vue-md-breakpoint | ||
|
||
## Usage | ||
|
||
You can use it as a mixin for your app. | ||
|
||
import Vue from 'vue'; | ||
import breakpoint from 'vue-md-breakpoint'; | ||
|
||
// in your app/component: | ||
|
||
mixins: [breakpoint], | ||
|
||
// and in your templates: | ||
|
||
<div v-if="$breakpoint.smAndUp"></div> | ||
|
||
## API | ||
|
||
- `$breakpoint.name` | ||
- `$breakpoint.xsOnly` | ||
- `$breakpoint.smOnly` | ||
- `$breakpoint.smAndDown` | ||
- `$breakpoint.smAndUp` | ||
- `$breakpoint.mdOnly` | ||
- `$breakpoint.mdAndDown` | ||
- `$breakpoint.mdAndUp` | ||
- `$breakpoint.lgOnly` | ||
- `$breakpoint.lgAndDown` | ||
- `$breakpoint.lgAndUp` | ||
- `$breakpoint.xlOnly` | ||
- `$breakpoint.width` | ||
- `$breakpoint.height` | ||
|
||
## Tests | ||
|
||
npm run test | ||
|
Oops, something went wrong.