mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
SearchV2: Fix search input width on mobile (#49850)
* SearchV2: Fix search input on mobile
This commit is contained in:
@@ -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)};
|
||||||
|
Reference in New Issue
Block a user