Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rynpsc committed Sep 18, 2020
1 parent 50c0bd1 commit 09acc3c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ This library contains an optional data attribute API that enables opening and cl

```js
import { domapi } from '@rynpsc/dialog';

domapi.mount()
```

```html
Expand All @@ -98,6 +100,38 @@ import { domapi } from '@rynpsc/dialog';

Where "dialog" is the ID of the dialog element.

#### `.mount()`

Get and add event listeners to elements with data attributes.

```js
domapi.mount();
```

#### `.unmount()`

Remove event listeners from elements.

```js
domapi.unmount();
```

#### `.openers`

Get elements that will trigger open.

```js
domapi.openers;
```

#### `.closers`

Get elements that will trigger close.

```js
domapi.closers;
```

## Options

```js
Expand Down

0 comments on commit 09acc3c

Please sign in to comment.