Hide description until hover (explorer) (#636)
* Hide description until hover (explorer) * Flexable top margin
This commit is contained in:
parent
da59e29191
commit
bae3c98e20
@ -60,7 +60,7 @@ class Extrinsics extends React.PureComponent<Props> {
|
||||
<h3>
|
||||
#{numberFormat(index)}: {section}.{method}
|
||||
</h3>
|
||||
<div className='description'>{
|
||||
<div className='description hover'>{
|
||||
meta && meta.documentation && meta.documentation.length
|
||||
? meta.documentation.map((doc) => doc.toString()).join(' ')
|
||||
: ''
|
||||
@ -68,7 +68,7 @@ class Extrinsics extends React.PureComponent<Props> {
|
||||
{this.renderSigner(extrinsic)}
|
||||
</div>
|
||||
<Call
|
||||
className='details'
|
||||
className='details hover'
|
||||
value={extrinsic}
|
||||
/>
|
||||
</article>
|
||||
|
||||
@ -58,7 +58,7 @@ class Logs extends React.PureComponent<Props> {
|
||||
</h3>
|
||||
<div className='description' />
|
||||
</div>
|
||||
<div className='details'>
|
||||
<div className='details hover'>
|
||||
{content}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@ -21,16 +21,14 @@
|
||||
opacity: 0.5625;
|
||||
}
|
||||
|
||||
&.summary {
|
||||
.details > .contains {
|
||||
height: 0;
|
||||
transition: none;
|
||||
transform: scale(0);
|
||||
}
|
||||
.hover {
|
||||
height: 0;
|
||||
transition: none;
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.details > .contains {
|
||||
.hover {
|
||||
height: auto;
|
||||
margin-top: 0.5rem;
|
||||
transform: scale(1);
|
||||
|
||||
@ -50,7 +50,7 @@ export default class BlockHeader extends React.PureComponent<Props> {
|
||||
: undefined
|
||||
}</div>
|
||||
</div>
|
||||
<div className='contains'>
|
||||
<div className='contains hover'>
|
||||
<div className='info'>
|
||||
<div className='type'>parentHash</div>
|
||||
<div className='hash'>{
|
||||
|
||||
@ -63,7 +63,7 @@ class Events extends React.PureComponent<Props> {
|
||||
: ''
|
||||
}{event.section}.{event.method}
|
||||
</h3>
|
||||
<div className='description'>
|
||||
<div className='description hover'>
|
||||
{
|
||||
event.meta.documentation && event.meta.documentation.length
|
||||
? event.meta.documentation.map((doc) => doc.toString()).join(' ')
|
||||
@ -72,7 +72,7 @@ class Events extends React.PureComponent<Props> {
|
||||
</div>
|
||||
</div>
|
||||
<EventDisplay
|
||||
className='details'
|
||||
className='details hover'
|
||||
value={event}
|
||||
/>
|
||||
</article>
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
.explorer--BlockByHash-flexable {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: -0.5rem;
|
||||
}
|
||||
|
||||
.explorer--BlockByHash-block {
|
||||
@ -44,30 +45,42 @@
|
||||
.explorer--Container {
|
||||
color: inherit;
|
||||
|
||||
&:hover > .details {
|
||||
.hover {
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
transition: none;
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
&:hover .hover {
|
||||
height: auto;
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
transition: all 200ms ease-in;
|
||||
|
||||
&.description {
|
||||
margin: 0.25rem 0 0.5rem 0;
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.description {
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
margin-bottom: 0.5rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
> .details {
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
transition: none;
|
||||
transform: scale(0);
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user