import { default as React } from 'react';
import { default as PropTypes } from 'prop-types';
/**
* Returns the href if it uses a safe protocol, or undefined if it
* uses a potentially dangerous scheme (javascript:, data:, etc).
*
* Accepts `unknown` rather than `string` on purpose: this is a security
* guard, and it must keep rejecting non-string input that reaches it from
* untyped call sites at runtime.
*/
export declare const getSafeHref: (href?: unknown) => string | null | undefined;
/**
* This is not a complete list of HTML elements;
* only the elements we want to support in `as` props.
*/
export declare const VALID_ELEMENTS: string[];
export interface AsElementProps {
/** element to render */
elementType?: React.ElementType;
children?: React.ReactNode;
/**
* Any additional props are spread onto the rendered element.
* `AsElement` is a passthrough, so this is intentionally open-ended.
*/
[key: string]: unknown;
}
/**
* Utility to conditionally render different HTML elements
* in our components. Useful for exposing `as` props:
*
* `
*
* @usage
*/
declare const AsElement: {
({ elementType, children, ...rest }: AsElementProps): React.JSX.Element;
propTypes: {
/** element to render */
elementType: PropTypes.Validator any)>>>;
children: PropTypes.Requireable>;
};
};
export default AsElement;
//# sourceMappingURL=AsElement.d.ts.map