forked from Ivasoft/mattermost-mobile
* MM-17700 - Updating bot tag css * Updating spacing for android
This commit is contained in:
committed by
Miguel Alatzar
parent
57d148bbf9
commit
f79c33099e
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import React, {PureComponent} from 'react';
|
import React, {PureComponent} from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import {Platform, View} from 'react-native';
|
||||||
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
|
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
|
||||||
import FormattedText from 'app/components/formatted_text';
|
import FormattedText from 'app/components/formatted_text';
|
||||||
|
|
||||||
@@ -23,11 +24,13 @@ export default class BotTag extends PureComponent {
|
|||||||
const style = createStyleSheet(this.props.theme);
|
const style = createStyleSheet(this.props.theme);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormattedText
|
<View style={style.bot}>
|
||||||
id='post_info.bot'
|
<FormattedText
|
||||||
defaultMessage='BOT'
|
id='post_info.bot'
|
||||||
style={style.bot}
|
defaultMessage='BOT'
|
||||||
/>
|
style={style.botText}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,12 +42,20 @@ const createStyleSheet = makeStyleSheetFromTheme((theme) => {
|
|||||||
backgroundColor: changeOpacity(theme.centerChannelColor, 0.15),
|
backgroundColor: changeOpacity(theme.centerChannelColor, 0.15),
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
color: theme.centerChannelColor,
|
color: theme.centerChannelColor,
|
||||||
fontSize: 10,
|
|
||||||
fontWeight: '600',
|
fontWeight: '600',
|
||||||
marginRight: 5,
|
marginRight: 2,
|
||||||
marginLeft: 5,
|
marginBottom: 1,
|
||||||
|
...Platform.select({
|
||||||
|
android: {
|
||||||
|
marginBottom: 0,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
marginLeft: 2,
|
||||||
paddingVertical: 2,
|
paddingVertical: 2,
|
||||||
paddingHorizontal: 4,
|
paddingHorizontal: 4,
|
||||||
},
|
},
|
||||||
|
botText: {
|
||||||
|
fontSize: 10,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user