Skip to content

Commit d27d1f7

Browse files
committed
update readme, description, version number, add repo
1 parent 5447157 commit d27d1f7

File tree

3 files changed

+69
-4
lines changed

3 files changed

+69
-4
lines changed

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,62 @@
11
# vue-loading-button
2+
3+
> Straightforward Vue button component with slideout loading indicator
4+
5+
## Props
6+
7+
|Prop |Type |Default|Description |
8+
|-------|-------|-------|------------------------------------|
9+
|loading|boolean|false |Controls loading indicator animation|
10+
|styled |boolean|false |Disables inessential default styles |
11+
12+
## Installation
13+
14+
Install the package from npm by running
15+
16+
```
17+
$ npm i vue-loading-button
18+
```
19+
20+
or
21+
22+
```
23+
$ yarn add vue-loading-button
24+
```
25+
26+
## Usage
27+
28+
Import, register and place the component in your Vue app.
29+
30+
```
31+
<template>
32+
[...]
33+
<VueLoadingButton />
34+
[...]
35+
</template>
36+
37+
<script>
38+
import VueLoadingButton from 'vue-loading-button'
39+
40+
[...]
41+
components: {
42+
VueLoadingButton,
43+
[...]
44+
</script>
45+
```
46+
47+
## Dev
48+
49+
Running example script requires @vue/cli and @vue/cli-service-global to be installed.
50+
Install globally by running `npm i --g @vue/cli @vue/cli-service-global` or `yarn add global vue/cli @vue/cli-service-global`
51+
52+
## Accessibility
53+
54+
Apply attributes, such as aria-label, directly on the element to apply them to the button.
55+
56+
```
57+
<template>
58+
[...]
59+
<VueLoadingButton aria-label='Send message' />
60+
[...]
61+
</template>
62+
```

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-loading-button",
33
"version": "0.1.2",
4-
"description": "",
4+
"description": "Vue button with slideout loading indicator",
55
"license": "MIT",
66
"main": "dist/vue-loading-button.umd.js",
77
"module": "dist/vue-loading-button.esm.js",
@@ -10,12 +10,16 @@
1010
"./sfc": "src/vue-loading-button.vue"
1111
},
1212
"scripts": {
13-
"example": "vue serve ./examples/example.vue",
13+
"example": "npm run build & vue serve ./examples/example.vue",
1414
"build": "npm run build:unpkg & npm run build:es & npm run build:umd",
1515
"build:umd": "rollup --config build/rollup.config.js --format umd --file dist/vue-loading-button.umd.js",
1616
"build:es": "rollup --config build/rollup.config.js --format es --file dist/vue-loading-button.esm.js",
1717
"build:unpkg": "rollup --config build/rollup.config.js --format iife --file dist/vue-loading-button.min.js"
1818
},
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/shwilliam/vue-loading-button.git"
22+
},
1923
"dependencies": {},
2024
"devDependencies": {
2125
"minimist": "^1.2.0",
@@ -26,4 +30,4 @@
2630
"vue": "^2.5.16",
2731
"vue-template-compiler": "^2.5.16"
2832
}
29-
}
33+
}

0 commit comments

Comments
 (0)