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:
Harrison Healey 2018-03-20 17:25:01 -04:00 committed by GitHub
parent 1f7ec07786
commit 082b7022af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 15 deletions

View file

@ -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,
},
});

View file

@ -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,
},
});