18 lines
399 B
JavaScript
18 lines
399 B
JavaScript
import styles from "../../styles/room/note.module.scss";
|
|
import { parseClassName } from "../../utils/utils.js";
|
|
|
|
export default function Note({ value, total, success }) {
|
|
return (
|
|
<div
|
|
className={parseClassName([
|
|
styles.main,
|
|
(value * 20) / total >= success ? styles["success"] : styles["fail"],
|
|
])}
|
|
>
|
|
{value}
|
|
<hr />
|
|
{total}
|
|
</div>
|
|
);
|
|
}
|