1.0.0 • Published 1 year ago

@weave-design/behaviors v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Behaviors

Shared component behaviors used across component

Getting started

yarn add @weave-design/behaviors

Import the component and CSS

import { HoverBehavior } from "@weave-design/behaviors";

Basic usage

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