mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 16:57:14 -06:00
b30d9f2732
* Move tab height and horizontal drawer height to themable variables so they can be referred to. Add a default height to tabbed container so it can set an explicit height. Add overflow: scroll to inspector content * Use height variable that changes on resize * Use css to set height
67 lines
1.3 KiB
TypeScript
67 lines
1.3 KiB
TypeScript
import { css } from '@emotion/css';
|
|
|
|
import { stylesFactory } from '@grafana/ui';
|
|
import { config } from 'app/core/config';
|
|
|
|
export const getPanelInspectorStyles = stylesFactory(() => {
|
|
return {
|
|
wrap: css`
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
width: 100%;
|
|
flex: 1 1 0;
|
|
`,
|
|
toolbar: css`
|
|
display: flex;
|
|
width: 100%;
|
|
flex-grow: 0;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
margin-bottom: ${config.theme.spacing.sm};
|
|
`,
|
|
toolbarItem: css`
|
|
margin-left: ${config.theme.spacing.md};
|
|
`,
|
|
content: css`
|
|
flex-grow: 1;
|
|
height: 100%;
|
|
overflow: scroll;
|
|
`,
|
|
editor: css`
|
|
font-family: monospace;
|
|
height: 100%;
|
|
flex-grow: 1;
|
|
`,
|
|
viewer: css`
|
|
overflow: scroll;
|
|
`,
|
|
dataFrameSelect: css`
|
|
flex-grow: 2;
|
|
`,
|
|
leftActions: css`
|
|
display: flex;
|
|
flex-grow: 1;
|
|
|
|
max-width: 85%;
|
|
@media (max-width: 1345px) {
|
|
max-width: 75%;
|
|
}
|
|
`,
|
|
options: css`
|
|
padding-top: ${config.theme.spacing.sm};
|
|
`,
|
|
dataDisplayOptions: css`
|
|
flex-grow: 1;
|
|
min-width: 300px;
|
|
margin-right: ${config.theme.spacing.sm};
|
|
`,
|
|
selects: css`
|
|
display: flex;
|
|
> * {
|
|
margin-right: ${config.theme.spacing.sm};
|
|
}
|
|
`,
|
|
};
|
|
});
|