Created
July 5, 2018 17:43
-
-
Save whisher/9a771ce65bb87dcd70c0fd934f089523 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class BurgerIngredient extends Component { | |
| render () { | |
| let ingredient = null; | |
| switch ( this.props.type ) { | |
| case ( 'bread-bottom' ): | |
| ingredient = <div className={classes.BreadBottom}></div>; | |
| break; | |
| case ( 'bread-top' ): | |
| ingredient = ( | |
| <div className={classes.BreadTop}> | |
| <div className={classes.Seeds1}></div> | |
| <div className={classes.Seeds2}></div> | |
| </div> | |
| ); | |
| break; | |
| case ( 'meat' ): | |
| ingredient = <div className={classes.Meat}></div>; | |
| break; | |
| case ( 'cheese' ): | |
| ingredient = <div className={classes.Cheese}></div>; | |
| break; | |
| case ( 'bacon' ): | |
| ingredient = <div className={classes.Bacon}></div>; | |
| break; | |
| case ( 'salad' ): | |
| ingredient = <div className={classes.Salad}></div>; | |
| break; | |
| default: | |
| ingredient = null; | |
| } | |
| return ingredient; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment