import * as React from "react";

import "../style/quickCategory.scss";
import { BookmarkFolder } from "../types/Bookmarks";
import QuickItem from "./QuickItem";

interface Props {
	folder: BookmarkFolder;
}

class QuickCategory extends React.Component<Props> {

	constructor(props) {
		super(props);
	}

	render(): JSX.Element {
		return <div className="quickCategory-component">
			<div className="title">
				{this.props.folder.name}
			</div>
			<div className="children">
				{this.props.folder.bookmarks.map((e, i) => {
					return <QuickItem bookmark={e} key={i} />;
				})}
			</div>
		</div>;
	}

}

export default QuickCategory;
