|
1 | 1 | <p align="center"> |
2 | | - <a href="https://github.com/wireui/alpine-hold-directive/blob/master/LICENSE"> |
3 | | - <img src="https://img.shields.io/github/license/wireui/alpine-hold-directive" alt="GitHub license" data-canonical-src="https://img.shields.io/github/license/wireui/alpine-hold-directive" style="max-width:100%;" /> |
| 2 | + <a href="https://github.com/wireui/alpinejs-hold-directive/blob/master/LICENSE"> |
| 3 | + <img src="https://img.shields.io/github/license/wireui/alpinejs-hold-directive" alt="GitHub license" data-canonical-src="https://img.shields.io/github/license/wireui/alpinejs-hold-directive" style="max-width:100%;" /> |
4 | 4 | </a> |
5 | 5 | <a href="https://twitter.com/ph7jack"> |
6 | | - <img alt="Twitter" src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fwireui%2Falpine-hold-directive"></a> |
| 6 | + <img alt="Twitter" src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fwireui%2Falpinejs-hold-directive"></a> |
7 | 7 | </a> |
8 | 8 | </p> |
9 | 9 |
|
10 | | -# Alpine Hold Directive |
| 10 | +# Alpine.js Hold Directive |
11 | 11 |
|
12 | | -[](https://github.com/wireui/alpine-hold-directive/actions/workflows/test.yml) |
| 12 | +[](https://github.com/wireui/alpinejs-hold-directive/actions/workflows/test.yml) |
13 | 13 |
|
14 | 14 | ### 🔥 Hold Directive |
15 | | -The alpine-hold-directive allows you to add a hold action to an element and call it when the button is holding. |
16 | | - |
| 15 | +The hold directive allows you to add a hold action to an element and call it when the button is holding. |
17 | 16 |
|
18 | 17 | ### 📚 Get Started |
19 | 18 | #### Prerequisites: |
20 | 19 | * [Alpinejs 3.10+](https://alpinejs.dev) |
21 | 20 |
|
22 | 21 | #### Install |
23 | 22 | ```bash |
24 | | -yarn add @wireui/alpine-hold-directive |
| 23 | +yarn add @wireui/alpinejs-hold-directive |
25 | 24 |
|
26 | 25 | or |
27 | 26 |
|
28 | | -npm i @wireui/alpine-hold-directive --save |
| 27 | +npm i @wireui/alpinejs-hold-directive --save |
29 | 28 | ``` |
30 | 29 |
|
31 | 30 | #### Configure |
32 | 31 | ```diff |
33 | 32 | // resources/js/app.js |
34 | 33 | import Alpine from 'alpinejs' |
35 | 34 |
|
36 | | -+ import HoldDirective from '@wireui/alpine-hold-directive' |
| 35 | ++ import HoldDirective from '@wireui/alpinejs-hold-directive' |
37 | 36 | + HoldDirective.register(Alpine) |
38 | 37 |
|
39 | 38 | // or |
40 | 39 |
|
41 | | -+ import { directive } from '@wireui/alpine-hold-directive' |
| 40 | ++ import { directive } from '@wireui/alpinejs-hold-directive' |
42 | 41 | + Alpine.directive('hold', directive) |
43 | 42 |
|
44 | 43 | window.Alpine = Alpine |
|
0 commit comments