@carbon/react
Version:
React components for the Carbon Design System
26 lines (25 loc) • 1.1 kB
TypeScript
/**
* Copyright IBM Corp. 2016, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { type RefObject } from 'react';
export declare const useNoInteractiveChildren: (ref: RefObject<HTMLElement | null>, message?: string) => void;
export declare const useInteractiveChildrenNeedDescription: (ref: RefObject<HTMLElement | null>, message?: string) => void;
/**
* Determines if a given DOM node has interactive content, or is itself
* interactive. It returns the interactive node if one is found.
*
* @param node - The node to check.
* @returns The interactive node, or `null` if none is found.
*/
export declare const getInteractiveContent: (node: HTMLElement) => HTMLElement | null;
/**
* Determines if a given DOM node has a `role`, or has itself a `role`.
* It returns the node with a `role` if one is found.
*
* @param node - The node to check.
* @returns The node with a `role`, or `null` if none is found.
*/
export declare const getRoleContent: (node: HTMLElement) => HTMLElement | null;