1 | import { ComponentType } from 'react';
|
2 | import { AsElementType } from '@instructure/shared-types';
|
3 | interface ComponentWithAsProp {
|
4 | as?: AsElementType;
|
5 | to?: string;
|
6 | href?: string | null;
|
7 | onClick?: ((...args: any) => any) | null;
|
8 | }
|
9 | /**
|
10 | * ---
|
11 | * category: utilities/react
|
12 | * ---
|
13 | * Get the React element type for a component.
|
14 | *
|
15 | * @module getElementType
|
16 | * @param {ComponentType} Component
|
17 | * @param {Object} props
|
18 | * @param {Function} getDefault an optional function that returns the default element type
|
19 | * @returns {String} the element type
|
20 | */
|
21 | declare function getElementType<T extends ComponentWithAsProp>(Component: Omit<ComponentType<T>, 'propTypes'>, props: T, getDefault?: () => AsElementType): AsElementType;
|
22 | export default getElementType;
|
23 | export { getElementType };
|
24 | //# sourceMappingURL=getElementType.d.ts.map |
\ | No newline at end of file |