Fix styles for identicon in expanded tx view ownerslist
This commit is contained in:
parent
86b0798351
commit
c56847d427
|
@ -5,11 +5,18 @@ import { toDataUrl } from './blockies'
|
|||
type Props = {
|
||||
address: string,
|
||||
diameter: number,
|
||||
className?: string,
|
||||
}
|
||||
|
||||
type IdenticonRef = { current: null | HTMLDivElement }
|
||||
|
||||
export default class Identicon extends React.PureComponent<Props> {
|
||||
static defaultProps = {
|
||||
className: '',
|
||||
}
|
||||
|
||||
identicon: IdenticonRef
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props)
|
||||
|
||||
|
@ -55,13 +62,13 @@ export default class Identicon extends React.PureComponent<Props> {
|
|||
return image
|
||||
}
|
||||
|
||||
identicon: IdenticonRef
|
||||
|
||||
render() {
|
||||
const style = this.getStyleFrom(this.props.diameter)
|
||||
const { diameter, className } = this.props
|
||||
const style = this.getStyleFrom(diameter)
|
||||
|
||||
return (
|
||||
<div style={style} ref={this.identicon} />
|
||||
<div className={className} style={style} ref={this.identicon} />
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ const OwnersList = ({ owners, classes }: Props) => (
|
|||
{owners.map(owner => (
|
||||
<ListItem key={owner.address} className={classes.owner}>
|
||||
<ListItemIcon>
|
||||
<Identicon address={owner.address} diameter={32} />
|
||||
<Identicon address={owner.address} diameter={32} className={classes.icon} />
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={owner.name} secondary={owner.address} />
|
||||
</ListItem>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// @flow
|
||||
import { border } from '~/theme/variables'
|
||||
import { border, sm } from '~/theme/variables'
|
||||
|
||||
export const styles = () => ({
|
||||
ownersList: {
|
||||
|
@ -8,6 +8,9 @@ export const styles = () => ({
|
|||
maxHeight: '192px',
|
||||
overflowY: 'scroll',
|
||||
},
|
||||
icon: {
|
||||
marginRight: sm,
|
||||
},
|
||||
owner: {
|
||||
borderBottom: `1px solid ${border}`,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue