mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-10-22 19:26:13 +02:00
scroll smooth
This commit is contained in:
parent
49d1bdea8a
commit
2bfddc288e
@ -54,9 +54,15 @@ class ConnectScreen extends Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scrollToTutorial = (e) => {
|
||||||
|
if (this.referenceNode) this.referenceNode.scrollIntoView({behavior: 'smooth'})
|
||||||
|
}
|
||||||
|
|
||||||
renderLearnMore () {
|
renderLearnMore () {
|
||||||
return (
|
return (
|
||||||
h('p.hw-connect__learn-more', {}, [
|
h('p.hw-connect__learn-more', {
|
||||||
|
onClick: this.scrollToTutorial,
|
||||||
|
}, [
|
||||||
this.context.t('learnMore'),
|
this.context.t('learnMore'),
|
||||||
h('img.hw-connect__learn-more__arrow', { src: 'images/caret-right.svg'}),
|
h('img.hw-connect__learn-more__arrow', { src: 'images/caret-right.svg'}),
|
||||||
])
|
])
|
||||||
@ -79,9 +85,11 @@ class ConnectScreen extends Component {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
return h('.hw-tutorial', {},
|
return h('.hw-tutorial', {
|
||||||
|
ref: node => { this.referenceNode = node },
|
||||||
|
},
|
||||||
steps.map((step, i) => (
|
steps.map((step, i) => (
|
||||||
h('div.hw-connect', [
|
h('div.hw-connect', {}, [
|
||||||
h('h3.hw-connect__title', {}, this.context.t(`step${i + 1}HardwareWallet`)),
|
h('h3.hw-connect__title', {}, this.context.t(`step${i + 1}HardwareWallet`)),
|
||||||
h('p.hw-connect__msg', {}, this.context.t(`step${i + 1}HardwareWalletMsg`)),
|
h('p.hw-connect__msg', {}, this.context.t(`step${i + 1}HardwareWalletMsg`)),
|
||||||
h('img.hw-connect__step-asset', { src: `images/${step.asset}.svg`, ...step.dimensions }),
|
h('img.hw-connect__step-asset', { src: `images/${step.asset}.svg`, ...step.dimensions }),
|
||||||
|
@ -184,6 +184,7 @@
|
|||||||
color: #5B5D67;
|
color: #5B5D67;
|
||||||
line-height: 19px;
|
line-height: 19px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
&__arrow {
|
&__arrow {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
|
Loading…
Reference in New Issue
Block a user