Download discord-clone/src/Components/Discord/Card.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 502 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/discord-clone/src/Components/Discord/Card.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/discord-clone/src/Components/Discord/Card.js
-
curl -L -o Card.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/discord-clone/src/Components/Discord/Card.js
502 Bytes
| import React from "react"; | |
| const Card = props => { | |
| return ( | |
| <div className="card"> | |
| <div | |
| className="card-bg" | |
| style={{ backgroundImage: `url(${props.img})` }} | |
| ></div> | |
| <div className="grp"> | |
| <h2>{props.header}</h2> | |
| <div | |
| className={props.joined ? "joined-btn btn" : "join-btn btn"} | |
| onClick={props.onClick} | |
| > | |
| {props.joined ? "Joined" : "Join"} | |
| </div> | |
| </div> | |
| </div> | |
| ); | |
| }; | |
| export default Card; | |