@hig/behaviors

2.1.0 • Public • Published

Behaviors

Shared component behaviors used across component

Getting started

yarn add @hig/behaviors

Import the component and CSS

import { HoverBehavior } from "@hig/behaviors";

Basic usage

<HoverBehavior>
  {({ hasHover, onMouseEnter, onMouseLeave }) => (
    <span
      style={{ color: hasHover ? "red" : "white" }}
      onMouseEnter={onMouseEnter}
      onMouseLeave={onMouseLeave}
    >
      Hello World
    </span>
  )}
</HoverBehavior>

Readme

Keywords

none

Package Sidebar

Install

npm i @hig/behaviors

Weekly Downloads

26

Version

2.1.0

License

Apache-2.0

Unpacked Size

19.9 kB

Total Files

5

Last publish

Collaborators

  • hig-bot
  • nfiniteset
  • wmui51
  • staceyshk