fix(header): more pleasant animation

This commit is contained in:
Alexey Kasyanchuk
2018-04-10 17:15:28 +03:00
parent fce7fe4369
commit 410c827905
2 changed files with 8 additions and 4 deletions

View File

@ -12,7 +12,7 @@ class Header extends React.Component {
componentDidMount()
{
window.onscroll = () => {
if (window.pageYOffset >= 10)
if (window.pageYOffset >= 15)
{
const scrollHeight = Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
@ -159,7 +159,7 @@ class Header extends React.Component {
padding: '15px',
background: `url('${Background}') no-repeat`,
backgroundSize: 'cover',
transition: '0.3s'
transition: '1s'
}}>
<RaisedButton
label="Search"
@ -271,7 +271,7 @@ class Header extends React.Component {
</div>
</CardMedia>
</Card>
<div className='clear-header-space' style={{transition: '0.3s'}} />
<div className='clear-header-space' style={{transition: '1.0s'}} />
</div>
)