[RN-112] Update the formatting of markdown block quotes (#538)
* RN-112 - Update the formatting of markdown block quotes * update style definitions * update per review
This commit is contained in:
parent
5f49c11497
commit
b7eeea3808
3 changed files with 11 additions and 6 deletions
|
|
@ -145,7 +145,7 @@ export default class Markdown extends PureComponent {
|
|||
renderBlockQuote = ({children, ...otherProps}) => {
|
||||
return (
|
||||
<MarkdownBlockQuote
|
||||
bulletStyle={this.props.baseTextStyle}
|
||||
blockStyle={this.props.blockStyles.quoteBlock}
|
||||
{...otherProps}
|
||||
>
|
||||
{children}
|
||||
|
|
|
|||
|
|
@ -4,16 +4,15 @@
|
|||
import React, {PureComponent} from 'react';
|
||||
import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
View
|
||||
} from 'react-native';
|
||||
|
||||
import Icon from 'react-native-vector-icons/FontAwesome';
|
||||
import CustomPropTypes from 'app/constants/custom_prop_types';
|
||||
|
||||
export default class MarkdownBlockQuote extends PureComponent {
|
||||
static propTypes = {
|
||||
blockStyle: CustomPropTypes.Style,
|
||||
bulletStyle: CustomPropTypes.Style,
|
||||
children: CustomPropTypes.Children.isRequired
|
||||
};
|
||||
|
||||
|
|
@ -21,9 +20,11 @@ export default class MarkdownBlockQuote extends PureComponent {
|
|||
return (
|
||||
<View style={style.container}>
|
||||
<View>
|
||||
<Text style={this.props.bulletStyle}>
|
||||
{'> '}
|
||||
</Text>
|
||||
<Icon
|
||||
name='quote-left'
|
||||
style={this.props.blockStyle}
|
||||
size={14}
|
||||
/>
|
||||
</View>
|
||||
<View>
|
||||
{this.props.children}
|
||||
|
|
|
|||
|
|
@ -832,6 +832,10 @@ const getMarkdownBlockStyles = makeStyleSheetFromTheme((theme) => {
|
|||
},
|
||||
horizontalRule: {
|
||||
backgroundColor: theme.centerChannelColor
|
||||
},
|
||||
quoteBlock: {
|
||||
color: changeOpacity(theme.centerChannelColor, 0.5),
|
||||
padding: 5
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue