import { useState } from "react"

export default function useFocus() {
  const [focused, setFocused] = useState(false)

  return [
    focused,
    { onFocus: () => setFocused(true), onBlur: () => setFocused(false) },
  ]
}