Adjust AccountName icon alignments (#3137)

* Adjust AccountName icon alignments

* Simplify

* 1px for whatever reason

* EditButton sizing fix
This commit is contained in:
Jaco Greeff 2020-07-07 14:28:26 +02:00 committed by GitHub
parent 90e238166f
commit 444c6802ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 17 deletions

View File

@ -1,5 +1,10 @@
# CHANGELOG
## 0.49.0-beta.x
- Allow input & display of OpaqueCall type from multisig
- Indicate own nominees on targets page (re-added with badges)
## 0.48.1 Jul 6, 2020
- Fix for electron package build (Thanks to https://github.com/EthWorks)

View File

@ -186,6 +186,8 @@ function AccountName ({ children, className = '', defaultName, label, noLookup,
export default React.memo(styled(AccountName)`
border: 1px dotted transparent;
height: 24px; // align with IdentityIcon
padding-top: 1px;
&.withSidebar:hover {
border-bottom-color: #333;
@ -196,14 +198,16 @@ export default React.memo(styled(AccountName)`
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: bottom;
width: 100%;
.name {
font-weight: normal !important;
filter: grayscale(100%);
height: 16px; // align with Badge
line-height: 1;
opacity: 0.6;
text-transform: uppercase;
vertical-align: middle;
&.isAddress {
font-family: monospace;
@ -220,14 +224,5 @@ export default React.memo(styled(AccountName)`
opacity: 0.75;
}
}
div.name {
display: inline-block;
}
> * {
line-height: 1em;
vertical-align: middle;
}
}
`);

View File

@ -117,12 +117,9 @@ export default React.memo(styled(AddressMini)`
top: -0.2rem;
}
.ui--AddressMini-address {
.ui--AddressMini-info {
max-width: 12rem;
min-width: 12rem;
overflow: hidden;
text-align: left;
text-overflow: ellipsis;
@media only screen and (max-width: 1800px) {
max-width: 11.5rem;
@ -153,6 +150,14 @@ export default React.memo(styled(AddressMini)`
max-width: 9rem;
min-width: 9rem;
}
}
.ui--AddressMini-address {
overflow: hidden;
text-align: left;
text-overflow: ellipsis;
width: fit-content;
max-width: inherit;
> div {
overflow: hidden;

View File

@ -16,10 +16,9 @@ interface Props {
className?: string;
icon?: IconName;
onClick: VoidFn;
size?: 'mini' | 'tiny' | 'small' | 'large' | 'big' | 'huge' | 'massive';
}
function EditButton ({ children, className, icon = 'edit', onClick, size = 'small' }: Props): React.ReactElement<Props> {
function EditButton ({ children, className, icon = 'edit', onClick }: Props): React.ReactElement<Props> {
return (
<div
className={className}
@ -31,7 +30,6 @@ function EditButton ({ children, className, icon = 'edit', onClick, size = 'smal
className='icon-button'
icon={icon}
isPrimary
size={size}
/>
</span>
</div>