jTruBela

scoreBox.jsx

Jun 30th, 2024
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //-------------------------------------------------------------------------------------------------------------------------------------------------------
  2. //  scoreBox.jsx
  3. // 
  4. //  Purpose: Component created for the scoreBox element which displays the current total score for the respective team
  5. //      loc: MainContainer              dep: useEffect, useState, away-score, away-total, home-score, home-total
  6. //
  7. //  JT,JG
  8. //  6/30/2024
  9. //-------------------------------------------------------------------------------------------------------------------------------------------------------
  10.  
  11.  
  12.  
  13. import { useEffect, useState } from 'react'
  14.  
  15. export default function ScoreBox( { teamName, score }) {
  16.   return (
  17.     <>
  18.       <div id="away-score" className="relative bg-green-900 min-w-max border-black text-white text-center py-4 rounded-md shadow-lg border-2 px-5 w-32">
  19.         <div className="text-lg font-bold pb-3">{teamName}</div>
  20.         <div id="away-total" className="text-5xl font-extrabold">{score}</div>
  21.         <div className="absolute top-10 left-3 right-3 h-0.5 bg-white"></div>
  22.       </div>
  23.     </>
  24.   )
  25. }
Advertisement
Add Comment
Please, Sign In to add comment