UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

19 lines (18 loc) 715 B
import React from "react"; export interface VirtualFocusItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "id" | "tabIndex"> { /** * The function that is run when the element is focused * (virtually, not actual focus, eg. set a border around an item) */ onActive: () => void; /** * The function that is run when the focused element * is to be selected (eg. do an actual search, change route... etc) */ onSelect: () => void; children: React.ReactNode; } /** * Contains an item you want to be iterable via virtual focus. */ export declare const VirtualFocusItem: React.ForwardRefExoticComponent<VirtualFocusItemProps & React.RefAttributes<HTMLElement>>;