From 111c238df2ce0406c78ddaf1a79a85e0fbd7494a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 4 Jul 2020 21:26:55 +0200 Subject: [PATCH] TextPanel: Fixed issue with new react text panel (#26061) (cherry picked from commit 8be735a6ec4809b2eae9f1c43651dbb129d68ce4) --- public/app/plugins/panel/text/TextPanel.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/text/TextPanel.tsx b/public/app/plugins/panel/text/TextPanel.tsx index 4cbbb322f48..043f5dea9a3 100644 --- a/public/app/plugins/panel/text/TextPanel.tsx +++ b/public/app/plugins/panel/text/TextPanel.tsx @@ -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 {} interface State { @@ -75,7 +77,16 @@ export class TextPanel extends PureComponent { render() { const { html } = this.state; + const styles = getStyles(); - return
; + return
; } } + +const getStyles = stylesFactory(() => { + return { + content: css` + height: 100%; + `, + }; +});