-
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
8 changed files
with
196 additions
and
46 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 |
---|---|---|
@@ -1,24 +1,71 @@ | ||
# whoosh | ||
# Whoosh | ||
|
||
## Project setup | ||
``` | ||
npm install | ||
npm install @adecrown/whoosh | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
npm run serve | ||
## Basic Usage | ||
Inside your main.js file | ||
```javascript | ||
import Whoosh from '@adecrown/whoosh' | ||
Vue.use(Whoosh) | ||
``` | ||
|
||
### Compiles and minifies for production | ||
then inside your App.vue file use Whoosh like this | ||
``` | ||
npm run build | ||
<Whoosh/> | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
npm run lint | ||
Whoosh can then be called anywhere like this | ||
```javascript | ||
this.$whoosh({ | ||
status:'error', | ||
title:'Something went wrong', | ||
message:'We could not find the id' | ||
}) | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). | ||
### API | ||
|
||
```javascript | ||
this.$whoosh({ | ||
// (optional) | ||
// Notification status 'success,warn,error' | ||
// custom status can also be passed here | ||
status: 'success', | ||
|
||
// (optional) | ||
// Notification title | ||
title: 'I am the title', | ||
|
||
// Notification message | ||
message: 'I am the message', | ||
|
||
// (optional) | ||
// This will override the default duration and the provided duration mains.js | ||
duration: 5, | ||
|
||
// (optional) | ||
// This will override the size and the provided prop size | ||
size: { | ||
width:400, | ||
height:250 | ||
} | ||
|
||
}) | ||
``` | ||
|
||
|
||
### Props Table | ||
|
||
All props are optional. | ||
|
||
| Name | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| duration | Number | 5 | how long you want the notification to stay on for (5 equals 5 seconds) | | ||
| fill | Boolean | false | fill the whole card with the status color | | ||
| closeOnClick | Boolean | false | notification will only close when it's clicked on | | ||
| textColor | String | black | set the text color to what you prefer | | ||
| size | Object | {width:500,height:200}| use it to set your prefered width and height| | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.