Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: message alignment #4503

Merged
merged 2 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1900,10 +1900,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 @@ -1969,7 +1965,6 @@ const webViewStyles = {
lineHeight: variables.fontSizeNormalHeight,
fontFamily: fontFamily.GTA,
flex: 1,
alignSelf: 'flex-start',
},
};

Expand Down