Detect when the focus is inside an element or any of its children.
This is custom React hooks, you need to follow the Basic Rules when you use it.
The border changes while any input inside has the focus.
const useFocusWithin = <T extends HTMLElement = HTMLElement>(options?: {
onFocus?: (event: FocusEvent) => void
onBlur?: (event: FocusEvent) => void
}) => {
ref: RefObject<T | null>
focused: boolean
}