Commit 8be735a6 by Torkel Ödegaard Committed by GitHub

TextPanel: Fixed issue with new react text panel (#26061)

parent c5cd9c56
......@@ -6,6 +6,8 @@ import { PanelProps, renderMarkdown, textUtil } from '@grafana/data';
import config from 'app/core/config';
// Types
import { TextOptions } from './types';
import { stylesFactory } from '@grafana/ui';
import { css, cx } from 'emotion';
interface Props extends PanelProps<TextOptions> {}
interface State {
......@@ -75,7 +77,16 @@ export class TextPanel extends PureComponent<Props, State> {
render() {
const { html } = this.state;
const styles = getStyles();
return <div className="markdown-html panel-text-content" dangerouslySetInnerHTML={{ __html: html }} />;
return <div className={cx('markdown-html', styles.content)} dangerouslySetInnerHTML={{ __html: html }} />;
}
}
const getStyles = stylesFactory(() => {
return {
content: css`
height: 100%;
`,
};
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment