Skip to content

Commit

Permalink
Renames due to name clash with hoverimage
Browse files Browse the repository at this point in the history
  • Loading branch information
romellem committed Apr 29, 2023
1 parent 29a3f5a commit 42984af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hover Image

[![npm version](https://badge.fury.io/js/romellem%2Fhover-image.svg)](https://badge.fury.io/js/romellem%2Fhover-image)
[![npm version](https://badge.fury.io/js/%40romellem%2Fhover-image.svg)](https://badge.fury.io/js/%40romellem%2Fhover-image)

A generic library to swap out an image on hover.

Expand All @@ -11,8 +11,8 @@ A generic library to swap out an image on hover.
## Install

```
yarn add hover-image
# or npm install hover-image
yarn add @romellem/hover-image
# or npm install @romellem/hover-image
```

## Usage
Expand Down Expand Up @@ -48,9 +48,9 @@ This data attribute is configured by the [`hoverImageSelectorAttribute`](#hoveri
Once your HTML is configured, you need to initialize the mouse event listeners:

```javascript
import initializeHoverImage from 'hover-image';
import initializeHoverImage from '@romellem/hover-image';
// Or, if non-transpiled:
// const initializeHoverImage = require('hover-image');
// const initializeHoverImage = require('@romellem/hover-image');

initializeHoverImage({
hoverSrcAttribute,
Expand All @@ -73,7 +73,7 @@ destroyHoverListeners();
Additionally, hover-image is published as a UMD module and so can be used directly in a browser context. When loading the UMD module, it is exposed under `window.hoverImage`.

```html
<script src="https://unpkg.com/hover-image/lib/umd/hover-image.min.js"></script>
<script src="https://unpkg.com/@romellem/hover-image/lib/umd/hover-image.min.js"></script>
<script>
var destroyHoverListeners = window.hoverImage({
// Options here...
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": "hover-image",
"name": "@romellem/hover-image",
"version": "0.3.4",
"description": "A generic library to swap out an image on hover.",
"main": "./lib/umd/hover-image.js",
Expand Down

0 comments on commit 42984af

Please sign in to comment.