Review feedback.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2022-04-12 11:25:25 +02:00
parent 1f51e960af
commit ca4420782c
5 changed files with 11 additions and 9 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ import { useTechDocsReaderPage } from './context';
/**
* Hook for use within TechDocs addons that provides access to the underlying
* shadow root of the current page, allowing the DOM within to be mutated.
* @public
* @alpha
*/
export const useShadowRoot = () => {
const { shadowRoot } = useTechDocsReaderPage();
@@ -31,7 +31,7 @@ export const useShadowRoot = () => {
* Convenience hook for use within TechDocs addons that provides access to
* elements that match a given selector within the shadow root.
*
* @public
* @alpha
*/
export const useShadowRootElements = <
TReturnedElement extends HTMLElement = HTMLElement,
@@ -58,7 +58,7 @@ const isValidSelection = (newSelection: Selection) => {
/**
* Hook for retreiving a selection within the ShadowRoot.
* @public
* @alpha
*/
export const useShadowRootSelection = (wait: number = 0) => {
const shadowRoot = useShadowRoot();