SearchV2: Fix search input width on mobile (#49850)

* SearchV2: Fix search input on mobile
This commit is contained in:
Maria Alexandra
2022-05-30 18:46:23 +02:00
committed by GitHub
parent 70980fbb44
commit 855655cc9c

View File

@@ -1,4 +1,4 @@
import { css } from '@emotion/css'; import { css, cx } from '@emotion/css';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useDebounce } from 'react-use'; import { useDebounce } from 'react-use';
@@ -38,8 +38,8 @@ export const ManageDashboardsNew = React.memo(({ folder }: Props) => {
return ( return (
<> <>
<div className="page-action-bar"> <div className={cx(styles.actionBar, 'page-action-bar')}>
<div className="gf-form gf-form--grow m-r-2"> <div className={cx(styles.inputWrapper, 'gf-form gf-form--grow m-r-2')}>
<Input <Input
value={inputValue} value={inputValue}
onChange={onSearchQueryChange} onChange={onSearchQueryChange}
@@ -68,6 +68,16 @@ ManageDashboardsNew.displayName = 'ManageDashboardsNew';
export default ManageDashboardsNew; export default ManageDashboardsNew;
const getStyles = (theme: GrafanaTheme2) => ({ const getStyles = (theme: GrafanaTheme2) => ({
actionBar: css`
${theme.breakpoints.down('sm')} {
flex-wrap: wrap;
}
`,
inputWrapper: css`
${theme.breakpoints.down('sm')} {
margin-right: 0 !important;
}
`,
searchInput: css` searchInput: css`
margin-bottom: 6px; margin-bottom: 6px;
min-height: ${theme.spacing(4)}; min-height: ${theme.spacing(4)};