MM-9709 Fixed max width of markdown list items (#1520)
* MM-9709 Fixed max width of markdown list items * Removed unnecessary flex from MarkdownListItem container
This commit is contained in:
parent
1f7ec07786
commit
082b7022af
2 changed files with 11 additions and 15 deletions
|
|
@ -1,9 +1,8 @@
|
|||
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
import React, {PureComponent} from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {StyleSheet, View} from 'react-native';
|
||||
import React, {PureComponent} from 'react';
|
||||
|
||||
export default class MarkdownList extends PureComponent {
|
||||
static propTypes = {
|
||||
|
|
@ -33,15 +32,9 @@ export default class MarkdownList extends PureComponent {
|
|||
});
|
||||
|
||||
return (
|
||||
<View style={style.indent}>
|
||||
<React.Fragment>
|
||||
{children}
|
||||
</View>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const style = StyleSheet.create({
|
||||
indent: {
|
||||
marginRight: 20,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export default class MarkdownListItem extends PureComponent {
|
|||
{bullet}
|
||||
</Text>
|
||||
</View>
|
||||
<View>
|
||||
<View style={style.contents}>
|
||||
{this.props.children}
|
||||
</View>
|
||||
</View>
|
||||
|
|
@ -50,12 +50,15 @@ export default class MarkdownListItem extends PureComponent {
|
|||
}
|
||||
|
||||
const style = StyleSheet.create({
|
||||
bullet: {
|
||||
alignItems: 'flex-end',
|
||||
marginRight: 5,
|
||||
},
|
||||
container: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'flex-start',
|
||||
},
|
||||
bullet: {
|
||||
alignItems: 'flex-end',
|
||||
marginRight: 5,
|
||||
},
|
||||
contents: {
|
||||
flex: 1,
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue