mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-24 05:05:39 +00:00
moved custom search to components folder (#5750)
* moved custom search to components folder * renamed custom search --------- Co-authored-by: Sid <siddharth@usebruno.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import * as jsonlint from '@prantlf/jsonlint';
|
||||
import { JSHINT } from 'jshint';
|
||||
import stripJsonComments from 'strip-json-comments';
|
||||
import { getAllVariables } from 'utils/collections';
|
||||
import CustomSearch from './CustomSearch';
|
||||
import CodeMirrorSearch from 'components/CodeMirrorSearch';
|
||||
|
||||
const CodeMirror = require('codemirror');
|
||||
window.jsonlint = jsonlint;
|
||||
@@ -267,7 +267,7 @@ export default class CodeEditor extends React.Component {
|
||||
font={this.props.font}
|
||||
fontSize={this.props.fontSize}
|
||||
>
|
||||
<CustomSearch
|
||||
<CodeMirrorSearch
|
||||
visible={this.state.searchBarVisible}
|
||||
editor={this.editor}
|
||||
onClose={() => this.setState({ searchBarVisible: false })}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { IconRegex, IconArrowUp, IconArrowDown, IconX, IconLetterCase, IconLetterW } from '@tabler/icons';
|
||||
import ToolHint from 'components/ToolHint';
|
||||
import StyledWrapper from './StyledWrapper';
|
||||
@@ -9,7 +8,7 @@ function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');
|
||||
}
|
||||
|
||||
const CustomSearch = ({ visible, editor, onClose }) => {
|
||||
const CodeMirrorSearch = ({ visible, editor, onClose }) => {
|
||||
const [searchText, setSearchText] = useState('');
|
||||
const [regex, setRegex] = useState(false);
|
||||
const [caseSensitive, setCaseSensitive] = useState(false);
|
||||
@@ -199,4 +198,4 @@ const CustomSearch = ({ visible, editor, onClose }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default CustomSearch;
|
||||
export default CodeMirrorSearch;
|
||||
Reference in New Issue
Block a user