feat: Adds visual stacking to nested modals (#1189)

Fixes various mobile styling/layout issues
This commit is contained in:
Tom Moor
2020-02-26 19:36:23 -08:00
committed by GitHub
parent f8c53f8a88
commit afba1edae4
5 changed files with 76 additions and 20 deletions

View File

@ -4,7 +4,7 @@ import keydown from 'react-keydown';
import { observer } from 'mobx-react';
import { observable } from 'mobx';
import { withRouter, type RouterHistory } from 'react-router-dom';
import { withTheme } from 'styled-components';
import styled, { withTheme } from 'styled-components';
import { SearchIcon } from 'outline-icons';
import { searchUrl } from 'utils/routeHelpers';
import Input from './Input';
@ -49,7 +49,7 @@ class InputSearch extends React.Component<Props> {
const { theme, placeholder = 'Search…' } = this.props;
return (
<Input
<InputMaxWidth
ref={ref => (this.input = ref)}
type="search"
placeholder={placeholder}
@ -67,4 +67,8 @@ class InputSearch extends React.Component<Props> {
}
}
const InputMaxWidth = styled(Input)`
max-width: 30vw;
`;
export default withTheme(withRouter(InputSearch));