This package has been deprecated

Author message:

package renamed to galvo-dom-clicker

@standard-library/galvo-clicker

0.1.3 • Public • Published

galvo-clicker

A function that, given a class name, creates an element with a corresponding click event stream. Could be used for adding left and right arrows to a slideshow.

Installation

yarn add @standard-library/galvo-clicker

Usage

import clicker from "@standard-library/galvo-clicker";

button = clicker("button");

button.element
// => <div class="button"></div>
button.click
// => Kefir.Stream

Using galvo this event stream can be used to move forward and backward in a sequence of elements:

import galvo from "@standard-library/galvo";
import clicker from "@standard-library/galvo-clicker";

const next = clicker("paginator");
const sequence = galvo({
  advance: next.click
}, ["a", "b", "c"]);

next.element.click();
next.element.click();

sequence.current
// => a---b---c

Readme

Keywords

none

Package Sidebar

Install

npm i @standard-library/galvo-clicker

Weekly Downloads

1

Version

0.1.3

License

MIT

Last publish

Collaborators

  • standard-library