import './recipecard.css'; function toTitleCase(str) { str = str.toLowerCase().split(' '); for (var i = 0; i < str.length; i++) { str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1); } return str.join(' '); } export default function RecipeCard(props) { return ( `
${props.recipe.name}
${ toTitleCase(props.recipe.name) }
${ new Array(props.recipe.rating).map(_useless => ( `
` )).join('') }
${ `$${props.recipe.price}` }
Min Order
${ props.recipe.tags.map(tag => ( `
${ toTitleCase(tag) }
` )).join('') }
` ); }