align chat icon

This commit is contained in:
Barry Gitarts 2019-07-24 14:57:06 -04:00 committed by Barry G
parent cc20069a28
commit 5df5dfbd81
3 changed files with 9 additions and 5 deletions

View File

@ -25,7 +25,7 @@ function IconTextField(props) {
const { iconName, classes } = props
return (
<div className={classes.iconRoot}>
<Icon name={iconName} className={classes.icon} />
<Icon name={iconName} className={classes.icon} centered />
<StatusTextField {...props} className={classes.textField} />
</div>
)

View File

@ -15,7 +15,7 @@ const icons = {
[PHOTO]: Photo
}
const Icon = ({ name }) => {
const Icon = ({ name, centered }) => {
const Component = icons[name]
return (
<div style={{
@ -23,8 +23,8 @@ const Icon = ({ name }) => {
borderRadius: '50%',
padding: '10px',
maxHeight: '45px',
justifySelf: 'center'
}}>
justifySelf: centered ? 'center' : 'auto'
}} >
<Component />
</div>
)

View File

@ -81,7 +81,11 @@ const styles = theme => ({
gridColumnStart: 1,
gridColumnEnd: 13,
justifyItems: 'start',
gridAutoFlow: 'column'
gridAutoFlow: 'column',
paddingLeft: '5px'
},
chatRoomIcon: {
justifySelf: 'auto'
},
chatText: {
marginTop: '15px',