Skip to content

Commit 29d9568

Browse files
Fix the examples in the readme and update the Codepen link
Signed-off-by: Alexandre Bonneau <[email protected]>
1 parent 0ac0f53 commit 29d9568

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ npm install autonumeric --save
3939
You'll then be able to use the vue-autonumeric component:
4040
```js
4141
import AutoNumeric from 'AutoNumeric';
42-
import VueAutoNumeric from 'vue-autonumeric';
42+
import VueAutonumeric from 'vue-autonumeric';
4343
```
4444

4545
### How to use?
@@ -48,7 +48,7 @@ The AutoNumeric component can be instantiated the same way `AutoNumeric` can.
4848

4949
With an option object:
5050
```html
51-
<autonumeric
51+
<vue-autonumeric
5252
v-model="myValue"
5353
:options="{
5454
digitGroupSeparator: '.',
@@ -59,34 +59,34 @@ With an option object:
5959
roundingMethod: 'U',
6060
minimumValue: '0'
6161
}"
62-
/>
62+
></vue-autonumeric>
6363
```
6464

6565
With a predefined option name:
6666
```html
67-
<autonumeric
67+
<vue-autonumeric
6868
v-model="myValue"
6969
:options="'French'"
70-
/>
70+
></vue-autonumeric>
7171
```
7272

7373
With multiple option objects/predefined options:
7474
```html
75-
<autonumeric
75+
<vue-autonumeric
7676
v-model="myValue"
7777
:options="['euro', { minimumValue: '0' }]"
78-
/>
78+
></vue-autonumeric>
7979
```
8080

8181
#### Other props
8282

8383
You can define the input placeholder using:
8484
```html
85-
<autonumeric
85+
<vue-autonumeric
8686
v-model="myValue"
8787
:options="'euro'"
8888
:placeholder="'Enter your value here'"
89-
/>
89+
></vue-autonumeric>
9090
```
9191

9292
*In the future, you'll be able to define the type of element tag (`<p>`, `<div>`, etc.) you want that component to generate.<br>This will allow you to create any supported tag with the `contenteditable` attribute set to `true`, instead of `<input>` one as it is for now.*
@@ -100,21 +100,21 @@ The `paste`, `drop` and `wheel` events are supported as well.
100100

101101
### Caveats
102102

103-
Please note that directly setting a `:value='42'` on the `<autonumeric>` component **will break it** (really!).<br>
103+
Please note that directly setting a `:value='42'` on the `<vue-autonumeric>` component **will break it** (really!).<br>
104104
Do **NOT** do that:
105105
```html
106-
<autonumeric
106+
<vue-autonumeric
107107
v-model="myValue"
108108
:options="{ minimumValue: '0' }"
109109
:value="42042.69" <!-- This fails -->
110-
/>
110+
></vue-autonumeric>
111111
```
112112

113113
### Demo
114114

115115
The official AutoNumeric [documentation](https://autonumeric.github.io/guide) ~~is~~ will soon be using this component extensively :)<br>
116116
<br>
117-
An editable live example is available [on Codepen](https://codepen.io/AnotherLinuxUser/pen/pWgOrZ).
117+
An editable live example is available [on Codepen](https://codepen.io/AnotherLinuxUser/pen/pWgOrZ?editors=1010).
118118

119119
### Requirements
120120

0 commit comments

Comments
 (0)