diff --git a/res/css/views/rooms/wysiwyg_composer/components/_FormattingButtons.pcss b/res/css/views/rooms/wysiwyg_composer/components/_FormattingButtons.pcss index 342a40c6065..02f875d24a5 100644 --- a/res/css/views/rooms/wysiwyg_composer/components/_FormattingButtons.pcss +++ b/res/css/views/rooms/wysiwyg_composer/components/_FormattingButtons.pcss @@ -92,6 +92,10 @@ limitations under the License. .mx_FormattingButtons_Button_strikethrough::before { mask-image: url('$(res)/img/element-icons/room/composer/strikethrough.svg'); } + + .mx_FormattingButtons_Button_inline_code::before { + mask-image: url('$(res)/img/element-icons/room/composer/inline_code.svg'); + } } .mx_FormattingButtons_Tooltip { diff --git a/res/img/element-icons/room/composer/inline_code.svg b/res/img/element-icons/room/composer/inline_code.svg new file mode 100644 index 00000000000..a4392d9bce5 --- /dev/null +++ b/res/img/element-icons/room/composer/inline_code.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx index c9408c8f0f3..98c13cfa43b 100644 --- a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx +++ b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx @@ -23,6 +23,7 @@ import { Alignment } from "../../../elements/Tooltip"; import { KeyboardShortcut } from "../../../settings/KeyboardShortcut"; import { KeyCombo } from "../../../../../KeyBindingsManager"; import { _td } from "../../../../../languageHandler"; +import { ButtonEvent } from "../../../elements/AccessibleButton"; interface TooltipProps { label: string; @@ -45,7 +46,7 @@ interface ButtonProps extends TooltipProps { function Button({ label, keyCombo, onClick, isActive, className }: ButtonProps) { return void} title={label} className={ classNames('mx_FormattingButtons_Button', className, { @@ -68,5 +69,6 @@ export function FormattingButtons({ composer, actionStates }: FormattingButtonsP