Laura/chore/refactor styling of explore container (#49324)

* Chore: convert styling from sass to emotion

* Chore: delete sass styling
This commit is contained in:
Laura
2022-05-23 10:55:04 +02:00
committed by GitHub
parent 1cc034d960
commit ebc6d3a63c
2 changed files with 11 additions and 12 deletions
+11 -4
View File
@@ -58,6 +58,13 @@ const getStyles = (theme: GrafanaTheme2) => {
display: unset !important; display: unset !important;
padding: ${theme.spacing(1)}; padding: ${theme.spacing(1)};
`, `,
exploreContainer: css`
display: flex;
flex: 1 1 auto;
flex-direction: column;
padding: ${theme.spacing(2)};
padding-top: 0;
`,
}; };
}; };
@@ -208,9 +215,9 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
}); });
}; };
renderEmptyState() { renderEmptyState(exploreContainerStyles: string) {
return ( return (
<div className="explore-container"> <div className={cx(exploreContainerStyles)}>
<NoDataSourceCallToAction /> <NoDataSourceCallToAction />
</div> </div>
); );
@@ -358,9 +365,9 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
scrollRefCallback={(scrollElement) => (this.scrollElement = scrollElement || undefined)} scrollRefCallback={(scrollElement) => (this.scrollElement = scrollElement || undefined)}
> >
<ExploreToolbar exploreId={exploreId} onChangeTime={this.onChangeTime} topOfViewRef={this.topOfViewRef} /> <ExploreToolbar exploreId={exploreId} onChangeTime={this.onChangeTime} topOfViewRef={this.topOfViewRef} />
{datasourceMissing ? this.renderEmptyState() : null} {datasourceMissing ? this.renderEmptyState(styles.exploreContainer) : null}
{datasourceInstance && ( {datasourceInstance && (
<div className="explore-container"> <div className={cx(styles.exploreContainer)}>
<div className={cx('panel-container', styles.queryContainer)}> <div className={cx('panel-container', styles.queryContainer)}>
<QueryRows exploreId={exploreId} /> <QueryRows exploreId={exploreId} />
<SecondaryActions <SecondaryActions
-8
View File
@@ -15,14 +15,6 @@
border-left: 1px dotted $table-border; border-left: 1px dotted $table-border;
} }
.explore-container {
display: flex;
flex: 1 1 auto;
flex-direction: column;
padding: $dashboard-padding;
padding-top: 0;
}
.explore-wrapper { .explore-wrapper {
display: flex; display: flex;
height: 100%; height: 100%;