github.com/quickfeed/quickfeed@v0.0.0-20240507093252-ed8ca812a09c/public/src/components/profile/ProfileCard.tsx (about)

     1  import React from "react"
     2  import { useAppState } from "../../overmind"
     3  
     4  
     5  /** ProfileCard displays the profile information of the provided children as a card. */
     6  const ProfileCard = ({ children }: { children: React.ReactNode }): JSX.Element => {
     7      const self = useAppState().self
     8  
     9      return (
    10          <div className="card" style={{ width: "28rem" }}>
    11              <div className="card-header text-center bg-dark" style={{ height: "5rem", marginBottom: "3rem" }}>
    12                  <img className="card-img" style={{ borderRadius: "50%", width: "8rem" }} src={self.AvatarURL} alt="Profile Card" />
    13              </div>
    14              <div className="card-body">
    15                  {children}
    16              </div>
    17          </div>
    18      )
    19  }
    20  
    21  export default ProfileCard