mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TextPanel: Fixed issue with new react text panel (#26061)
This commit is contained in:
parent
c5cd9c5648
commit
8be735a6ec
@ -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%;
|
||||
`,
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user