@grafana/ui
Version:
Grafana Components Library
13 lines (12 loc) • 625 B
TypeScript
import { HTMLAttributes, PropsWithChildren } from 'react';
import * as React from 'react';
export interface RenderUserContentAsHTMLProps<T = HTMLSpanElement> extends Omit<HTMLAttributes<T>, 'dangerouslySetInnerHTML'> {
component?: keyof React.ReactHTML;
content: string;
}
/**
* Abstraction layer component for sanitizing and rendering an html content.
*
* https://developers.grafana.com/ui/latest/index.html?path=/docs/utilities-renderusercontentashtml--docs
*/
export declare function RenderUserContentAsHTML<T>({ component, content, ...rest }: PropsWithChildren<RenderUserContentAsHTMLProps<T>>): JSX.Element;