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

This commit is contained in:
Torkel Ödegaard 2020-07-04 21:26:55 +02:00 committed by GitHub
parent c5cd9c5648
commit 8be735a6ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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%;
`,
};
});