This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TeslaWheels from '../components/TeslaWheels/TeslaWheels'; | |
import { connect } from 'react-redux'; | |
import { changeWheel } from '../actions' | |
const mapStateToProps = (state) => { | |
return { | |
value: state.config.wheels | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tesla-car { | |
width: 100%; | |
min-height: 350px; | |
background: #fff url(../../assets/tesla.jpg) no-repeat top center; | |
background-size: contain; } | |
.tesla-car-animation { | |
-webkit-animation: slide-in-elliptic-bottom-fwd 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; | |
-moz-animation: slide-in-elliptic-bottom-fwd 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; | |
animation: slide-in-elliptic-bottom-fwd 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './TeslaCar.css'; | |
const TeslaCar = (props) => ( | |
<div className="tesla-car tesla-car-animation"> | |
<div className="tesla-wheels tesla-wheels-animation"> | |
<div className={`tesla-wheel tesla-wheel--front tesla-wheel--${props.wheelsize}`}></div> | |
<div className={`tesla-wheel tesla-wheel--rear tesla-wheel--${props.wheelsize}`}></div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './TeslaCounter.css'; | |
class TeslaCounter extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
animationEffect: false, | |
direction: '' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './TeslaCounter.css'; | |
class TeslaCounter extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
direction: '' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './Header.css'; | |
import logoUrl from '../../assets/logo.svg'; | |
const Header = () => ( | |
<div className="header header-animation"> | |
<img src={logoUrl} alt="Tesla" /> | |
</div> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.header { | |
padding: 25px 0; | |
text-align: center; | |
background: #222; | |
} | |
.header img { | |
width: 100px; | |
height: 13px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrapper { | |
margin: 100px 0 150px; | |
} | |
.tesla-battery { | |
width: 1050px; | |
margin: 0 auto; | |
} | |
.tesla-battery h1 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const counterDefaultVal = { | |
speed: { | |
title: "Speed", | |
unit: "mph", | |
step: 5, | |
min: 45, | |
max: 70 | |
}, | |
temperature: { | |
title: "Outside Temperature", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { counterDefaultVal } from '../constants/counterDefaultVal'; | |
export const speedUp = (value) => { | |
return { | |
type: 'SPEED_UP', | |
value, | |
step: counterDefaultVal.speed.step, | |
maxValue: counterDefaultVal.speed.max | |
} | |
} |
NewerOlder