Skip to content

Commit

Permalink
rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
ph7jack committed Aug 15, 2022
1 parent 13cd7b8 commit a5d84f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
<p align="center">
<a href="https://github.com/wireui/alpine-hold-directive/blob/master/LICENSE">
<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%;" />
<a href="https://github.com/wireui/alpinejs-hold-directive/blob/master/LICENSE">
<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%;" />
</a>
<a href="https://twitter.com/ph7jack">
<img alt="Twitter" src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fwireui%2Falpine-hold-directive"></a>
<img alt="Twitter" src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Fwireui%2Falpinejs-hold-directive"></a>
</a>
</p>

# Alpine Hold Directive
# Alpine.js Hold Directive

[![Tests](https://github.com/wireui/alpine-hold-directive/actions/workflows/test.yml/badge.svg)](https://github.com/wireui/alpine-hold-directive/actions/workflows/test.yml)
[![Tests](https://github.com/wireui/alpinejs-hold-directive/actions/workflows/test.yml/badge.svg)](https://github.com/wireui/alpinejs-hold-directive/actions/workflows/test.yml)

### 🔥 Hold Directive
The alpine-hold-directive allows you to add a hold action to an element and call it when the button is holding.

The hold directive allows you to add a hold action to an element and call it when the button is holding.

### 📚 Get Started
#### Prerequisites:
* [Alpinejs 3.10+](https://alpinejs.dev)

#### Install
```bash
yarn add @wireui/alpine-hold-directive
yarn add @wireui/alpinejs-hold-directive

or

npm i @wireui/alpine-hold-directive --save
npm i @wireui/alpinejs-hold-directive --save
```

#### Configure
```diff
// resources/js/app.js
import Alpine from 'alpinejs'

+ import HoldDirective from '@wireui/alpine-hold-directive'
+ import HoldDirective from '@wireui/alpinejs-hold-directive'
+ HoldDirective.register(Alpine)

// or

+ import { directive } from '@wireui/alpine-hold-directive'
+ import { directive } from '@wireui/alpinejs-hold-directive'
+ Alpine.directive('hold', directive)

window.Alpine = Alpine
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@wireui/alpine-hold-directive",
"name": "@wireui/alpinejs-hold-directive",
"private": false,
"version": "1.0.0",
"description": "Alpine.js x-hold directive",
Expand Down

0 comments on commit a5d84f4

Please sign in to comment.