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

(cherry picked from commit 8be735a6ec)
This commit is contained in:
Torkel Ödegaard
2020-07-13 14:41:21 +02:00
committed by Andrej Ocenas
parent 1630f21aee
commit 111c238df2
+12 -1
View File
@@ -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%;
`,
};
});