Modal: Adjust padding at small screen sizes (#112635)
adjust modal padding at small screen sizes
This commit is contained in:
@@ -46,6 +46,9 @@ export const getModalStyles = (theme: GrafanaTheme2) => {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
minHeight: '42px',
|
minHeight: '42px',
|
||||||
margin: theme.spacing(1, 2, 0, 2),
|
margin: theme.spacing(1, 2, 0, 2),
|
||||||
|
[theme.breakpoints.down('sm')]: {
|
||||||
|
margin: theme.spacing(0, 1, 0, 1),
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
modalHeaderWithTabs: css({
|
modalHeaderWithTabs: css({
|
||||||
borderBottom: `1px solid ${theme.colors.border.weak}`,
|
borderBottom: `1px solid ${theme.colors.border.weak}`,
|
||||||
@@ -79,6 +82,11 @@ export const getModalStyles = (theme: GrafanaTheme2) => {
|
|||||||
marginBottom: theme.spacing(3),
|
marginBottom: theme.spacing(3),
|
||||||
scrollbarWidth: 'thin',
|
scrollbarWidth: 'thin',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
|
||||||
|
[theme.breakpoints.down('sm')]: {
|
||||||
|
padding: theme.spacing(1, 2, 0, 2),
|
||||||
|
marginBottom: theme.spacing(2),
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
modalButtonRow: css({
|
modalButtonRow: css({
|
||||||
background: theme.colors.background.primary,
|
background: theme.colors.background.primary,
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ function getStyles(theme: GrafanaTheme2, builtIn = false) {
|
|||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
|
columnGap: theme.spacing(1),
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}),
|
}),
|
||||||
rightSection: css({
|
rightSection: css({
|
||||||
@@ -143,7 +144,6 @@ function getStyles(theme: GrafanaTheme2, builtIn = false) {
|
|||||||
display: 'block',
|
display: 'block',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
transform: 'translateX(-50%)',
|
|
||||||
width: theme.spacing(0.5),
|
width: theme.spacing(0.5),
|
||||||
left: 0,
|
left: 0,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -320,10 +320,9 @@ function getDataSourceModalStyles(theme: GrafanaTheme2) {
|
|||||||
}),
|
}),
|
||||||
builtInDataSources: css({
|
builtInDataSources: css({
|
||||||
flex: '1 1',
|
flex: '1 1',
|
||||||
marginBottom: theme.spacing(4),
|
|
||||||
|
|
||||||
[theme.breakpoints.down('md')]: {
|
[theme.breakpoints.down('md')]: {
|
||||||
flex: 0,
|
display: 'none',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
builtInDataSourcesList: css({
|
builtInDataSourcesList: css({
|
||||||
@@ -345,6 +344,7 @@ function getDataSourceModalStyles(theme: GrafanaTheme2) {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
paddingTop: theme.spacing(1),
|
||||||
}),
|
}),
|
||||||
newDSDescription: css({
|
newDSDescription: css({
|
||||||
flex: '1 0',
|
flex: '1 0',
|
||||||
@@ -352,6 +352,9 @@ function getDataSourceModalStyles(theme: GrafanaTheme2) {
|
|||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
color: theme.colors.text.secondary,
|
color: theme.colors.text.secondary,
|
||||||
|
[theme.breakpoints.down('sm')]: {
|
||||||
|
visibility: 'hidden',
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
searchInput: css({
|
searchInput: css({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
|||||||
Reference in New Issue
Block a user