add hw2
This commit is contained in:
29
node_modules/@headlessui/react/dist/hooks/use-inert-others.d.ts
generated
vendored
Normal file
29
node_modules/@headlessui/react/dist/hooks/use-inert-others.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Mark all elements on the page as inert, except for the ones that are allowed.
|
||||
*
|
||||
* We move up the tree from the allowed elements, and mark all their siblings as
|
||||
* inert. If any of the children happens to be a parent of one of the elements,
|
||||
* then that child will not be marked as inert.
|
||||
*
|
||||
* E.g.:
|
||||
*
|
||||
* ```html
|
||||
* <body> <!-- Stop at body -->
|
||||
* <header></header> <!-- Inert, sibling of parent -->
|
||||
* <main> <!-- Not inert, parent of allowed element -->
|
||||
* <div>Sidebar</div> <!-- Inert, sibling of parent -->
|
||||
* <div> <!-- Not inert, parent of allowed element -->
|
||||
* <listbox> <!-- Not inert, parent of allowed element -->
|
||||
* <button></button> <!-- Not inert, allowed element -->
|
||||
* <options></options> <!-- Not inert, allowed element -->
|
||||
* </listbox>
|
||||
* </div>
|
||||
* </main>
|
||||
* <footer></footer> <!-- Inert, sibling of parent -->
|
||||
* </body>
|
||||
* ```
|
||||
*/
|
||||
export declare function useInertOthers(enabled: boolean, { allowed, disallowed, }?: {
|
||||
allowed?: () => (HTMLElement | null)[];
|
||||
disallowed?: () => (HTMLElement | null)[];
|
||||
}): void;
|
||||
Reference in New Issue
Block a user