Skip to content

Commit

Permalink
Merge pull request #4503 from parasharrajat/fix-alignment
Browse files Browse the repository at this point in the history
fix: message alignment
  • Loading branch information
HorusGoul authored Aug 10, 2021
2 parents 347a208 + a5a0b8e commit c9d2e75
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 13 additions & 9 deletions src/components/InlineCodeBlock/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@ import WrappedText from './WrappedText';
import inlineCodeBlockPropTypes from './inlineCodeBlockPropTypes';

const InlineCodeBlock = ({
TDefaultRenderer,
defaultRendererProps,
boxModelStyle,
textStyle,
}) => (
<WrappedText
textStyles={[textStyle]}
wordStyles={[
boxModelStyle,
styles.codeWordStyle,
]}
// eslint-disable-next-line react/jsx-props-no-spreading
<TDefaultRenderer
// eslint-disable-next-line react/jsx-props-no-spreading
{...defaultRendererProps}
>
{defaultRendererProps.tnode.data}
</WrappedText>
<WrappedText
textStyles={[textStyle]}
wordStyles={[
boxModelStyle,
styles.codeWordStyle,
]}
>
{defaultRendererProps.tnode.data}
</WrappedText>
</TDefaultRenderer>
);

InlineCodeBlock.propTypes = inlineCodeBlockPropTypes;
Expand Down
1 change: 1 addition & 0 deletions src/components/RenderHTML/BaseRenderHTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const BaseRenderHTML = ({html, debug, textSelectable}) => {
return (
<HTML
defaultTextProps={{selectable: textSelectable}}
defaultViewProps={{style: {alignItems: 'flex-start'}}}
customHTMLElementModels={customHTMLElementModels}
renderers={renderers}
renderersProps={renderersProps}
Expand Down
5 changes: 0 additions & 5 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1991,10 +1991,6 @@ const webViewStyles = {
// styles from the renderer, just pass the "style" prop to the underlying
// component.
tagStyles: {
body: {
flexDirection: 'row',
},

em: {
fontFamily: fontFamily.GTA_ITALIC,
fontStyle: 'italic',
Expand Down Expand Up @@ -2060,7 +2056,6 @@ const webViewStyles = {
lineHeight: variables.fontSizeNormalHeight,
fontFamily: fontFamily.GTA,
flex: 1,
alignSelf: 'flex-start',
},
};

Expand Down

0 comments on commit c9d2e75

Please sign in to comment.