import styled from "styled-components"; import { Headline, Item, ItemList, ListContainer, SubHeadline, } from "./elements"; const GroupContainer = styled.div` display: flex; flex-direction: column; flex: 2 1 auto; padding: 1rem 0; `; const Bookmark = styled.a` font-weight: 400; text-decoration: none; color: ${(props) => props.theme.accentColor}; padding-top: 0.75rem; font-size: 0.9rem; &:hover { text-decoration: underline; } `; export interface IBookmarkProps { name: string; url: string; } export interface IBookmarkGroupProps { name: string; items: Array; } export interface IBookmarkListProps { groups: Array; } /** * Renders a given bookmark group * @param {IBookmarkGroupProps} props given props of the bookmark group * @returns {React.ReactNode} the bookmark group component */ export const BookmarkGroup = ({ name, items }: IBookmarkGroupProps) => ( {name} {items.map(({ name, url }, index) => ( {name} ))} ); /** * Renders a given list of categorized bookmarks * @param {IBookmarkListProps} props props of the given bookmark list * @returns {React.ReactNode} the bookmark list component */ const BookmarkList = ({ groups }: IBookmarkListProps) => ( Bookmarks {groups.map(({ name, items }, index) => ( ))} ); export default BookmarkList;