ajoute un scroll lent lors du début d'une simulation

pull/294/head
Johan Girod 2018-08-03 12:37:33 +02:00 committed by Mael
parent 4881be2f36
commit ac4e036a9b
2 changed files with 6 additions and 2 deletions

View File

@ -114,7 +114,7 @@ export default class Simu extends Component {
<div id="focusZone">
{displayConversation && (
<>
<ScrollToTop />
<ScrollToTop behavior="smooth" />
<Conversation textColourOnWhite={colours.textColourOnWhite} />
</>
)}

View File

@ -1,9 +1,13 @@
import { Component } from 'react'
export default class ScrollToTop extends Component {
props = {
behavior: 'auto'
}
componentDidMount() {
window.scroll({
top: 0
top: 0,
behavior: this.props.behavior
})
}
render() {