Merge pull request #3 from TeamBNBN/fe/classcard

[Front-End] classcard 추가
This commit is contained in:
FlashingFuture 2024-07-15 13:01:22 +09:00 committed by GitHub
commit bcf3e934c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import { Link } from 'react-router-dom';
import styles from './ClassCard.module.css';
export default function ClassCard({ path, children }) {
return (
<Link
to={path}
className={styles.card}
>
<div className={styles.thumbnail} />
<div>{children}</div>
</Link>
);
}

View File

@ -0,0 +1,19 @@
.card {
display: flex;
flex-direction: column;
gap: 20px;
width: 295px;
height: 295px;
font-size: 20px;
line-height: 1.2;
font-weight: 400;
}
.thumbnail {
width: 100%;
height: 100%;
border-radius: 20px;
background-color: var(--background-secondary);
border: 1px solid var(--border-color);
box-sizing: border-box;
}

View File

@ -0,0 +1 @@
export { default as ClassCard } from './ClassCard';

View File

@ -0,0 +1,10 @@
import styles from './ClassGrid.module.css';
export default function ClassGrid({ title, children }) {
return (
<section>
<h2 className={styles.title}>{title}</h2>
<div className={styles.grid}>{children}</div>
</section>
);
}

View File

@ -0,0 +1,14 @@
.title {
font-size: 32px;
line-height: 1.2;
font-weight: 700;
color: var(--text-color);
margin: 0 0 40px;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(295px, auto));
gap: 20px;
justify-content: start;
}

View File

@ -0,0 +1 @@
export { default as ClassGrid } from './ClassGrid';