29 lines
492 B
TypeScript
29 lines
492 B
TypeScript
import * as React from "react";
|
|
|
|
import "../style/quickItem.scss";
|
|
import { Bookmark } from "../types/Bookmarks";
|
|
|
|
interface Props {
|
|
bookmark: Bookmark;
|
|
}
|
|
|
|
class QuickItem extends React.Component<Props> {
|
|
|
|
constructor(props) {
|
|
super(props);
|
|
}
|
|
|
|
onClick() {
|
|
window.location.href = this.props.bookmark.url;
|
|
}
|
|
|
|
render(): JSX.Element {
|
|
return <div className="quickItem-component" onClick={() => this.onClick()}>
|
|
{this.props.bookmark.name}
|
|
</div>;
|
|
}
|
|
|
|
}
|
|
|
|
export default QuickItem;
|