Refactored project structure

This commit is contained in:
squidfunk
2021-11-14 16:09:09 +01:00
parent ad1b964aaa
commit 88ba609ee1
52 changed files with 721 additions and 459 deletions

View File

@@ -20,7 +20,7 @@
* IN THE SOFTWARE.
*/
import { getElementOrThrow, getElements } from "~/browser"
import { getElement, getElements } from "~/browser"
/* ----------------------------------------------------------------------------
* Types
@@ -114,7 +114,7 @@ interface ComponentTypeMap {
export function getComponentElement<T extends ComponentType>(
type: T, node: ParentNode = document
): ComponentTypeMap[T] {
return getElementOrThrow(`[data-md-component=${type}]`, node)
return getElement(`[data-md-component=${type}]`, node)
}
/**