1 | import { ComponentType } from 'react';
|
2 | import { AsElementType } from '@instructure/shared-types';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | interface PropsObject {
|
8 | as?: AsElementType;
|
9 | to?: string;
|
10 | href?: string | null;
|
11 | onClick?: ((...args: any) => any) | null;
|
12 | }
|
13 | /**
|
14 | * ---
|
15 | * category: utilities/react
|
16 | * ---
|
17 | * Get the React element type for a component.
|
18 | *
|
19 | * @module getElementType
|
20 | * @param {ComponentType} Component
|
21 | * @param {Object} props
|
22 | * @param {Function} getDefault an optional function that returns the default element type
|
23 | * @returns {String} the element type
|
24 | */
|
25 | declare function getElementType<T extends PropsObject>(Component: Omit<ComponentType<T>, 'propTypes'>, props: T, getDefault?: () => AsElementType<T>): "symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "center" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "animate" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | import("react").FunctionComponent<any> | import("react").ComponentClass<any, any> | "noindex" | "animateMotion" | "animateTransform" | "mpath" | import("react").ComponentClass<T, any> | import("react").FunctionComponent<T> | NonNullable<T["as"]>;
|
26 | export default getElementType;
|
27 | export { getElementType };
|
28 | //# sourceMappingURL=getElementType.d.ts.map |
\ | No newline at end of file |