(props: DummyTextNodeProps)
| 52 | +children: string, |
| 53 | }; |
| 54 | function DummyTextNode(props: DummyTextNodeProps): React.Node { |
| 55 | const { children, style, withoutMarkdown, ...rest } = props; |
| 56 | const maxWidth = useComposedMessageMaxWidth(); |
| 57 | const viewStyle = [props.style, styles.dummyMessage, { maxWidth }]; |
| 58 | const rules = useTextMessageMarkdownRules(false); |
| 59 | |
| 60 | let content; |
| 61 | if (withoutMarkdown) { |
| 62 | content = <Text style={styles.text}>{children}</Text>; |
| 63 | } else { |
| 64 | content = ( |
| 65 | <Markdown style={styles.text} rules={rules}> |
| 66 | {children} |
| 67 | </Markdown> |
| 68 | ); |
| 69 | } |
| 70 | |
| 71 | return ( |
| 72 | <View {...rest} style={viewStyle}> |
| 73 | {content} |
| 74 | </View> |
| 75 | ); |
| 76 | } |
| 77 | |
| 78 | type Props = { |
| 79 | +item: ChatTextMessageInfoItemWithHeight, |
nothing calls this directly
no test coverage detected