import Link from "./Link";
import styles from "@/styles/PostList.module.sass"

const PostList = ({ posts }: {
    posts: [{ title: string, date: string, link: string }]
}) => {
    return (
        <ul className={styles.blog_posts}>
            {posts.map(post => (
                <li className={styles.blog_post_row}>
                    <pre style={{
                        paddingRight: ".5rem",
                        paddingBottom: ".5rem"
                    }} >{post.date}</pre>
                    <Link href={post.link} title={post.title} withArrow />
                </li>
            ))}
        </ul>
    );
};

export default PostList; 