Skip to content

Add style prop for hover, focus and active state #22

Description

@markusjwetzel

It would be useful to have a handy way to add hover, focus and active state. So we might should add a hoverStyle, focusStyle and activeStyle prop to all components.

An alternative would be to implement a hook (i.e. useHoverState), but to me it seems to be easier to use props instead of a hook.

Resources:
https://gist.github.com/necolas
https://codesandbox.io/s/o9q8vy70l5
https://github.com/Shagamii/pseudo-class-example/blob/master/src/AccessibleComponent.js

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions