Skip to content

Commit df1cb0f

Browse files
committed
rename SearchForm to SearchPanel
1 parent 15d794d commit df1cb0f

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

packages/code-editor/src/CodeEditor/CodeEditor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { CodeEditorContextMenu } from '../CodeEditorContextMenu';
1717
import { CodeEditorCopyButton } from '../CodeEditorCopyButton';
1818
import { CopyButtonVariant } from '../CodeEditorCopyButton/CodeEditorCopyButton.types';
1919
import { Panel as CodeEditorPanel } from '../Panel';
20-
import { SearchForm } from '../SearchForm';
20+
import { SearchPanel } from '../SearchPanel';
2121
import { getLgIds } from '../utils';
2222

2323
import { useModules } from './hooks/useModules';
@@ -284,7 +284,7 @@ const BaseCodeEditor = forwardRef<CodeEditorHandle, CodeEditorProps>(
284284
dom.style.justifyContent = 'flex-end';
285285

286286
createRoot(dom).render(
287-
React.createElement(SearchForm, {
287+
React.createElement(SearchPanel, {
288288
view,
289289
}),
290290
);

packages/code-editor/src/SearchForm/SearchForm.spec.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/code-editor/src/SearchForm/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react';
2+
import { render } from '@testing-library/react';
3+
4+
import { SearchPanel } from './SearchPanel';
5+
6+
describe('SearchPanel', () => {});

packages/code-editor/src/SearchForm/SearchForm.stories.tsx renamed to packages/code-editor/src/SearchPanel/SearchPanel.stories.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { StoryFn } from '@storybook/react';
99
import LeafyGreenProvider from '@leafygreen-ui/leafygreen-provider';
1010
import { BaseFontSize } from '@leafygreen-ui/tokens';
1111

12-
import { SearchForm } from './SearchForm';
12+
import { SearchPanel } from './SearchPanel';
1313

1414
const Root = (Story: StoryFn, context: any) => (
1515
<LeafyGreenProvider
@@ -20,9 +20,9 @@ const Root = (Story: StoryFn, context: any) => (
2020
</LeafyGreenProvider>
2121
);
2222

23-
const meta: StoryMetaType<typeof SearchForm> = {
24-
title: 'Components/Inputs/CodeEditor/SearchForm',
25-
component: SearchForm,
23+
const meta: StoryMetaType<typeof SearchPanel> = {
24+
title: 'Components/Inputs/CodeEditor/SearchPanel',
25+
component: SearchPanel,
2626
parameters: {
2727
default: 'LiveExample',
2828
controls: {
@@ -49,7 +49,7 @@ const meta: StoryMetaType<typeof SearchForm> = {
4949

5050
export default meta;
5151

52-
const Template: StoryFn<typeof SearchForm> = args => <SearchForm {...args} />;
52+
const Template: StoryFn<typeof SearchPanel> = args => <SearchPanel {...args} />;
5353

5454
export const LiveExample = Template.bind({});
5555
export const Generated = () => {};
File renamed without changes.

packages/code-editor/src/SearchForm/SearchForm.tsx renamed to packages/code-editor/src/SearchPanel/SearchPanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ import {
3939
replaceInputContainerStyles,
4040
replaceSectionStyles,
4141
toggleButtonStyles,
42-
} from './SearchForm.styles';
43-
import { SearchFormProps } from './SearchForm.types';
42+
} from './SearchPanel.styles';
43+
import { SearchPanelProps } from './SearchPanel.types';
4444

45-
export function SearchForm({ view }: SearchFormProps) {
45+
export function SearchPanel({ view }: SearchPanelProps) {
4646
const [isOpen, setIsOpen] = useState(false);
4747
const [searchString, setSearchString] = useState('');
4848
const [replaceString, setReplaceString] = useState('');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CodeMirrorView } from '../CodeEditor';
22

3-
export interface SearchFormProps {
3+
export interface SearchPanelProps {
44
view: CodeMirrorView;
55
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { SearchPanel } from './SearchPanel';
2+
export { type SearchPanelProps } from './SearchPanel.types';

0 commit comments

Comments
 (0)