From c0bf45fddc95001198705a7b3038a914f5141c73 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Fri, 14 Oct 2022 10:56:34 +0200 Subject: [PATCH] Rename wysiwyg prop into composer --- .../rooms/wysiwyg_composer/FormattingButtons.tsx | 12 ++++++------ .../views/rooms/wysiwyg_composer/WysiwygComposer.tsx | 2 +- .../wysiwyg_composer/FormattingButtons-test.tsx | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/views/rooms/wysiwyg_composer/FormattingButtons.tsx b/src/components/views/rooms/wysiwyg_composer/FormattingButtons.tsx index 90a4ec2b1e..19941ad3f9 100644 --- a/src/components/views/rooms/wysiwyg_composer/FormattingButtons.tsx +++ b/src/components/views/rooms/wysiwyg_composer/FormattingButtons.tsx @@ -55,15 +55,15 @@ function Button({ label, keyCombo, onClick, isActive, className }: ButtonProps) } interface FormattingButtonsProps { - wysiwyg: ReturnType['wysiwyg']; + composer: ReturnType['wysiwyg']; formattingStates: ReturnType['formattingStates']; } -export function FormattingButtons({ wysiwyg, formattingStates }: FormattingButtonsProps) { +export function FormattingButtons({ composer, formattingStates }: FormattingButtonsProps) { return
-
; } diff --git a/src/components/views/rooms/wysiwyg_composer/WysiwygComposer.tsx b/src/components/views/rooms/wysiwyg_composer/WysiwygComposer.tsx index 1747fe5170..300417f66d 100644 --- a/src/components/views/rooms/wysiwyg_composer/WysiwygComposer.tsx +++ b/src/components/views/rooms/wysiwyg_composer/WysiwygComposer.tsx @@ -57,7 +57,7 @@ export function WysiwygComposer( return (
- + { children?.(memoizedSendMessage) }
diff --git a/test/components/views/rooms/wysiwyg_composer/FormattingButtons-test.tsx b/test/components/views/rooms/wysiwyg_composer/FormattingButtons-test.tsx index da3cfa887c..6c3e8573ae 100644 --- a/test/components/views/rooms/wysiwyg_composer/FormattingButtons-test.tsx +++ b/test/components/views/rooms/wysiwyg_composer/FormattingButtons-test.tsx @@ -41,7 +41,7 @@ describe('FormattingButtons', () => { it('Should have the correspond CSS classes', () => { // When - render(); + render(); // Then expect(screen.getByLabelText('Bold')).toHaveClass('mx_FormattingButtons_active'); @@ -52,7 +52,7 @@ describe('FormattingButtons', () => { it('Should call wysiwyg function on button click', () => { // When - render(); + render(); screen.getByLabelText('Bold').click(); screen.getByLabelText('Italic').click(); screen.getByLabelText('Underline').click(); @@ -68,7 +68,7 @@ describe('FormattingButtons', () => { it('Should display the tooltip on mouse over', async () => { // When const user = userEvent.setup(); - render(); + render(); await user.hover(screen.getByLabelText('Bold')); // Then