Skip to content

Commit

Permalink
Merge pull request #4624 from parasharrajat/code-block
Browse files Browse the repository at this point in the history
fix: Inline code block styling
  • Loading branch information
johnmlee101 authored Aug 16, 2021
2 parents 4959c83 + 441ea5e commit 69ee2fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/components/InlineCodeBlock/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import {Text} from 'react-native';
import inlineCodeBlockPropTypes from './inlineCodeBlockPropTypes';

const InlineCodeBlock = ({
Expand All @@ -8,10 +9,15 @@ const InlineCodeBlock = ({
textStyle,
}) => (
<TDefaultRenderer
style={{...boxModelStyle, ...textStyle}}
// eslint-disable-next-line react/jsx-props-no-spreading
{...defaultRendererProps}
/>
>
<Text
style={{...boxModelStyle, ...textStyle}}
>
{defaultRendererProps.tnode.data}
</Text>
</TDefaultRenderer>
);

InlineCodeBlock.propTypes = inlineCodeBlockPropTypes;
Expand Down
8 changes: 4 additions & 4 deletions src/styles/codeStyles/index.android.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const codeWordWrapper = {
height: 10,
height: 20,
};

const codeWordStyle = {
top: -1,
marginVertical: -2,
height: 18,
top: 4,
};

const codeTextStyle = {
lineHeight: 18,
lineHeight: 15,
};

export default {codeWordWrapper, codeWordStyle, codeTextStyle};

0 comments on commit 69ee2fe

Please sign in to comment.