import React, { ReactElement } from 'react'; import { BaseButton } from '..'; import { useMessageComposerApi } from '../../context'; import { Gap } from '../Gap'; import { TMarkdownStyle } from '../../interfaces'; import { emitter } from '../../../../lib/methods/helpers/emitter'; export const Markdown = (): ReactElement => { const { setMarkdownToolbar } = useMessageComposerApi(); const onPress = (style: TMarkdownStyle) => emitter.emit('addMarkdown', { style }); return ( <> setMarkdownToolbar(false)} testID='message-composer-close-markdown' accessibilityLabel='Close' icon='close' /> onPress('bold')} testID='message-composer-bold' accessibilityLabel='Bold' icon='bold' /> onPress('italic')} testID='message-composer-italic' accessibilityLabel='Italic' icon='italic' /> onPress('strike')} testID='message-composer-strike' accessibilityLabel='Strikethrough' icon='strike' /> onPress('code')} testID='message-composer-code' accessibilityLabel='Inline_code' icon='code' /> onPress('code-block')} testID='message-composer-code-block' accessibilityLabel='Code_block' icon='code-block' /> ); };