File tree Expand file tree Collapse file tree 3 files changed +368
-211
lines changed
dashboards/widgets/widget Expand file tree Collapse file tree 3 files changed +368
-211
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import styled from '@emotion/styled';
4
4
5
5
import ErrorBoundary from 'sentry/components/errorBoundary' ;
6
6
import { space } from 'sentry/styles/space' ;
7
+ import { defined } from 'sentry/utils' ;
7
8
import {
8
9
MIN_HEIGHT ,
9
10
MIN_WIDTH ,
@@ -73,6 +74,7 @@ function WidgetLayout(props: Widget) {
73
74
height = { props . height }
74
75
borderless = { props . borderless }
75
76
revealActions = { revealActions }
77
+ minHeight = { defined ( props . height ) ? Math . min ( props . height , MIN_HEIGHT ) : MIN_HEIGHT }
76
78
>
77
79
< Header noPadding = { props . noHeaderPadding } >
78
80
{ props . Title && < Fragment > { props . Title } </ Fragment > }
@@ -132,14 +134,15 @@ const TitleHoverItems = styled('div')`
132
134
const Frame = styled ( 'div' ) < {
133
135
borderless ?: boolean ;
134
136
height ?: number ;
137
+ minHeight ?: number ;
135
138
revealActions ?: 'always' | 'hover' ;
136
139
} > `
137
140
position: relative;
138
141
display: flex;
139
142
flex-direction: column;
140
143
141
144
height: ${ p => ( p . height ? `${ p . height } px` : '100%' ) } ;
142
- min-height: ${ MIN_HEIGHT } px;
145
+ min-height: ${ p => p . minHeight } px;
143
146
width: 100%;
144
147
min-width: ${ MIN_WIDTH } px;
145
148
You can’t perform that action at this time.
0 commit comments