0.1.1 • Published 5 years ago

@rock-kit/ui-focusable v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

category: packages

ui-focusable

npm  build-status  MIT License  Code of Conduct

A utility used to identify when an element receives focus.

Components

The ui-focusable package contains the following:

Installation

yarn add @rock-kit/ui-focusable

Usage

import React from 'react'
import { Focusable } from '@rock-kit/ui-focusable'

const MyFocusableElement = () => {
  return (
    <Focusable>
    {({ focused }) => (
      <FocusableView focused={focused}>
        Hello! Focus me!
      </FocusableView>
    )}
    </Focusable>
  )
}