RN-187 Fixed right margin for block quotes (#638)
This commit is contained in:
parent
d2b2503c04
commit
44f6321336
3 changed files with 10 additions and 7 deletions
|
|
@ -202,7 +202,7 @@ export default class Markdown extends React.PureComponent {
|
|||
renderBlockQuote = ({children, ...otherProps}) => {
|
||||
return (
|
||||
<MarkdownBlockQuote
|
||||
blockStyle={this.props.blockStyles.quoteBlock}
|
||||
iconStyle={this.props.blockStyles.quoteBlockIcon}
|
||||
{...otherProps}
|
||||
>
|
||||
{children}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import CustomPropTypes from 'app/constants/custom_prop_types';
|
|||
|
||||
export default class MarkdownBlockQuote extends PureComponent {
|
||||
static propTypes = {
|
||||
blockStyle: CustomPropTypes.Style,
|
||||
iconStyle: CustomPropTypes.Style,
|
||||
children: CustomPropTypes.Children.isRequired
|
||||
};
|
||||
|
||||
|
|
@ -22,11 +22,11 @@ export default class MarkdownBlockQuote extends PureComponent {
|
|||
<View>
|
||||
<Icon
|
||||
name='quote-left'
|
||||
style={this.props.blockStyle}
|
||||
style={this.props.iconStyle}
|
||||
size={14}
|
||||
/>
|
||||
</View>
|
||||
<View>
|
||||
<View style={style.childContainer}>
|
||||
{this.props.children}
|
||||
</View>
|
||||
</View>
|
||||
|
|
@ -36,7 +36,10 @@ export default class MarkdownBlockQuote extends PureComponent {
|
|||
|
||||
const style = StyleSheet.create({
|
||||
container: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'flex-start'
|
||||
alignItems: 'flex-start',
|
||||
flexDirection: 'row'
|
||||
},
|
||||
childContainer: {
|
||||
flex: 1
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export const getMarkdownBlockStyles = makeStyleSheetFromTheme((theme) => {
|
|||
flex: 1,
|
||||
marginVertical: 10
|
||||
},
|
||||
quoteBlock: {
|
||||
quoteBlockIcon: {
|
||||
color: changeOpacity(theme.centerChannelColor, 0.5),
|
||||
padding: 5
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue