Skip to content

Commit d5c5a80

Browse files
committed
Updated README.md and version.
1 parent 057de19 commit d5c5a80

File tree

5 files changed

+46
-13
lines changed

5 files changed

+46
-13
lines changed

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,36 @@ yarn add vue-toggle-component
2222
npm install vue-toggle-component --save
2323
```
2424

25-
#### Importing the package in your Vue application
26-
```javascript
27-
import VueToggle from 'vue-toggle-component';
28-
```
29-
3025

3126
### Usage
3227
#### Example
3328
```html
3429
<template>
3530
<VueToggle title="Toggle me" id="1"/>
3631
</template>
32+
33+
<script>
34+
import VueToggle from "./components/VueToggle";
35+
36+
export default {
37+
name: 'App',
38+
components: {
39+
VueToggle
40+
}
41+
}
42+
</script>
3743
```
44+
45+
#### Properties that vue-toggle-component uses
46+
| Property name | Description |
47+
| ------------- | ---------------------------- |
48+
| `activeColor` | The active color the checked toggler uses. This is a hex code. Default: `#9FD6AE` |
49+
| `darkTheme` | Give this prop to the component to use the dark mode feature as shown in the GIF above. |
50+
| `id` | The ID the input and the label use in the component. |
51+
| `name` | The name attributes that will be set in the input. |
52+
| `title` | The title that is shown after the toggler itself. |
53+
| `toggled` | The value the toggler has by default, by default this is `false` |
54+
3855
### Vue version support
3956

4057
The main v1 version supports Vue 3.x only, for previous versions of Vue, check the following the table.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-toggle-component",
3-
"version": "1.0.6",
3+
"version": "1.0.10",
44
"main": "dist/vue-toggle-component.common.js",
55
"files": [
66
"dist/*"

src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ export default {
1111
VueToggle
1212
}
1313
}
14-
1514
</script>

vue-toggle-component/README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,36 @@ yarn add vue-toggle-component
2222
npm install vue-toggle-component --save
2323
```
2424

25-
#### Importing the package in your Vue application
26-
```javascript
27-
import VueToggle from 'vue-toggle-component';
28-
```
29-
3025

3126
### Usage
3227
#### Example
3328
```html
3429
<template>
3530
<VueToggle title="Toggle me" id="1"/>
3631
</template>
32+
33+
<script>
34+
import VueToggle from "./components/VueToggle";
35+
36+
export default {
37+
name: 'App',
38+
components: {
39+
VueToggle
40+
}
41+
}
42+
</script>
3743
```
44+
45+
#### Properties that vue-toggle-component uses
46+
| Property name | Description |
47+
| ------------- | ---------------------------- |
48+
| `activeColor` | The active color the checked toggler uses. This is a hex code. Default: `#9FD6AE` |
49+
| `darkTheme` | Give this prop to the component to use the dark mode feature as shown in the GIF above. |
50+
| `id` | The ID the input and the label use in the component. |
51+
| `name` | The name attributes that will be set in the input. |
52+
| `title` | The title that is shown after the toggler itself. |
53+
| `toggled` | The value the toggler has by default, by default this is `false` |
54+
3855
### Vue version support
3956

4057
The main v1 version supports Vue 3.x only, for previous versions of Vue, check the following the table.

vue-toggle-component/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-toggle-component",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44

55
"main": "dist/vue-toggle-component.ssr.js",
66
"browser": "dist/vue-toggle-component.esm.js",

0 commit comments

Comments
 (0)