Use monospace font for regex in searchable
Summary: Seemed a bit weird typing a regex without monospace. Still would be good to have syntax highlighting. I tried using prismjs, but it seems to not work by default on Input elements. Reviewed By: danielbuechele Differential Revision: D15918742 fbshipit-source-id: b44c228b30f37f97811d09c80b191b52282720f8
This commit is contained in:
committed by
Facebook Github Bot
parent
c22bdbe205
commit
5200f4f528
@@ -37,6 +37,7 @@ export const SearchBox = styled(FlexBox)({
|
||||
|
||||
export const SearchInput = styled(Input)(props => ({
|
||||
border: props.focus ? '1px solid black' : 0,
|
||||
...(props.regex ? {fontFamily: 'monospace'} : {}),
|
||||
padding: 0,
|
||||
fontSize: '1em',
|
||||
flexGrow: 1,
|
||||
@@ -437,6 +438,7 @@ const Searchable = (
|
||||
? this.state.compiledRegex !== null
|
||||
: true
|
||||
}
|
||||
regex={this.state.regexEnabled && this.state.searchTerm}
|
||||
/>
|
||||
</SearchBox>
|
||||
{this.props.regexSupported ? (
|
||||
|
||||
Reference in New Issue
Block a user