* fix: Part fix #264. Trim address. Add CopyButton. Align CopyButton with monospace * fix: Remove CopyButton * fix: Add empty div so double clicking to copy address only selects the address itself * fix: Add key prop to div to avoid error * fix: Add PostCSS Mixins. Reuse font family for hashes. Add missing license header. * Add PostCSS Mixins dependency to allow reuse to make CSS DRYer * Create generic mixin for common font family used by different hashes displayed in UI (i.e. block, data, address) * Create extension of the generic mixin for the block hash * Add missing license header * fix: Rename mixin to hash font traits * fix: Remove hash-block-font-family since we are only using it once * fix: Revert Mixins and variable
This commit is contained in:
parent
2c24ed9d78
commit
88963b03a1
@ -2,6 +2,10 @@
|
||||
/* This software may be modified and distributed under the terms
|
||||
/* of the ISC license. See the LICENSE file for details. */
|
||||
|
||||
.ui--Param-Address {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.ui--Params-Content {
|
||||
box-sizing: border-box;
|
||||
padding-left: 2em;
|
||||
|
||||
@ -51,7 +51,9 @@ function accountToText (_address: string | Uint8Array): React.ReactNode {
|
||||
size={24}
|
||||
value={address}
|
||||
/>,
|
||||
div({ key: 'address' }, address)
|
||||
div({ key: 'address', className: 'ui--Param-Address' }, address),
|
||||
// Empty div so double clicking on the address only selects the address
|
||||
<div key={address}></div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -123,7 +125,7 @@ function valueToText (type: Param$Types, value: any, swallowError: boolean = tru
|
||||
|
||||
if (type === 'AccountId') {
|
||||
return value && value.length
|
||||
? accountToText(value as string)
|
||||
? accountToText(value.trim() as string)
|
||||
: unknown;
|
||||
}
|
||||
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
/* This software may be modified and distributed under the terms
|
||||
/* of the ISC license. See the LICENSE file for details. */
|
||||
|
||||
@import 'partials/_variables.css';
|
||||
|
||||
.ui--output {
|
||||
background: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
/* Copyright 2017-2018 @polkadot/ui-app authors & contributors
|
||||
/* This software may be modified and distributed under the terms
|
||||
/* of the ISC license. See the LICENSE file for details. */
|
||||
|
||||
$small-corner: .28571429rem;
|
||||
|
||||
$green: #77c689;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user