Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created December 15, 2018 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/e0133c97963e199ff392b0735ab59c82 to your computer and use it in GitHub Desktop.
Save productioncoder/e0133c97963e199ff392b0735ab59c82 to your computer and use it in GitHub Desktop.
Youtube in React: Rating component skeleton
import React from 'react';
import './Rating.scss';
import {Icon, Progress} from "semantic-ui-react";
export function Rating() {
let progress = null;
if (props.likeCount && props.dislikeCount) {
const percent = 100 * (props.likeCount / (props.likeCount + props.dislikeCount));
progress = <Progress className='progress' percent={percent} size='tiny'/>;
}
/* return (...) */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment