Created the Card component
This commit is contained in:
parent
3688f08bda
commit
70b1fb5028
22
src/pages/More/components/Card/Card.jsx
Normal file
22
src/pages/More/components/Card/Card.jsx
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import "./styles.sass";
|
||||||
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||||
|
import {faCaretRight} from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import {Link} from "react-router-dom";
|
||||||
|
|
||||||
|
|
||||||
|
const Card = (props) => {
|
||||||
|
|
||||||
|
const content = <div className="card">
|
||||||
|
<div className="content">
|
||||||
|
<FontAwesomeIcon icon={props.icon} className="icon"/>
|
||||||
|
<h2 className="text">{props.text}</h2>
|
||||||
|
</div>
|
||||||
|
<FontAwesomeIcon icon={faCaretRight} className="icon"/>
|
||||||
|
</div>;
|
||||||
|
|
||||||
|
return (
|
||||||
|
props.to.startsWith("https") ? <a href={props.to} className="link" target="_blank">{content}</a> : <Link to={props.to} className="link">{content}</Link>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Card;
|
Loading…
x
Reference in New Issue
Block a user