UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

24 lines (23 loc) 1.23 kB
import { InputSearchProps } from './InputSearch'; type ValidationProps = Pick<InputSearchProps, 'id' | 'label' | 'hideLabel' | 'popoverContent'>; /** * Validates the given properties of the DSInputSearch component for common configuration errors. * This function is intended to be used in development mode to provide developers with * warnings about potential misuse of the component. * * @param validationProps - The subset of DSInputSearch properties to validate. This includes * id and label. */ export declare const validateInputSearchProps: ({ id, label, hideLabel, popoverContent, }: ValidationProps) => void; /** * Determines whether the specified HTMLElement is within a form element. * * This function checks if the given HTMLElement (`host`) is a descendant of * a `<form>` element in the DOM tree. It utilizes the `getClosestHTMLElement` * function to find the closest ancestor that matches the 'form' selector. * * @param {HTMLElement} host - The HTMLElement to check for being within a form. * @returns {boolean} `true` if the `host` element is within a `<form>` element; otherwise, `false`. */ export declare const isWithinForm: (host: HTMLElement) => boolean; export {};