Created
August 10, 2017 16:19
-
-
Save pyldin601/3f92ba06907fd474fc2cda665e4a412e 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
// @flow | |
import React from 'react'; | |
const starEmoji = '⭐'; | |
type StarPropsShape = {| score: number |}; | |
const Star = ({ score }: StarPropsShape) => ( | |
<span className="score-star"> | |
{starEmoji.repeat(Math.floor(score))} | |
</span> | |
); | |
export default Star; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment