Last active
December 15, 2018 14:46
-
-
Save productioncoder/b72c1490c7883c8e9bc644134f9e13d7 to your computer and use it in GitHub Desktop.
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 {Icon, Progress} from "semantic-ui-react"; | |
export function Rating() { | |
/* ... */ | |
return ( | |
<div className='rating'> | |
<div className='thumbs-up'> | |
<Icon name='thumbs outline up'/> | |
<span>{props.likeCount}</span> | |
</div> | |
<div className='thumbs-down'> | |
<Icon name='thumbs outline down'/> | |
<span>{props.dislikeCount}</span> | |
</div> | |
{progress} | |
</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
.rating { | |
display: inline-grid; | |
grid: auto auto / max-content max-content; | |
column-gap: 16px; | |
grid-row-gap: 4px; | |
.thumbs-up { | |
grid-column: 1 / 2; | |
grid-row: 1 / 2; | |
} | |
.thumbs-down { | |
grid-column: 2 / 3; | |
grid-row: 1 / 2; | |
} | |
.progress { | |
grid-column: 1 / span 2; | |
grid-row: 2 / 3; | |
&.ui.progress:last-child { | |
margin-bottom: 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment