From c07412a992284b2f3045be1c620ea2e0a351139a Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Tue, 2 Oct 2018 20:10:59 +0100
Subject: Use new Link UI component everywhere, and add complementary ALink
 type

---
 packages/website/ts/components/ui/menu_item.tsx | 51 -------------------------
 1 file changed, 51 deletions(-)
 delete mode 100644 packages/website/ts/components/ui/menu_item.tsx

(limited to 'packages/website/ts/components/ui/menu_item.tsx')

diff --git a/packages/website/ts/components/ui/menu_item.tsx b/packages/website/ts/components/ui/menu_item.tsx
deleted file mode 100644
index 0cb4b387c..000000000
--- a/packages/website/ts/components/ui/menu_item.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Link } from 'react-router-dom';
-
-interface MenuItemProps {
-    to: string;
-    style?: React.CSSProperties;
-    onClick?: () => void;
-    className?: string;
-}
-
-interface MenuItemState {
-    isHovering: boolean;
-}
-
-export class MenuItem extends React.Component<MenuItemProps, MenuItemState> {
-    public static defaultProps: Partial<MenuItemProps> = {
-        onClick: _.noop.bind(_),
-        className: '',
-    };
-    public constructor(props: MenuItemProps) {
-        super(props);
-        this.state = {
-            isHovering: false,
-        };
-    }
-    public render(): React.ReactNode {
-        const menuItemStyles = {
-            cursor: 'pointer',
-            opacity: this.state.isHovering ? 0.5 : 1,
-        };
-        return (
-            <Link to={this.props.to} style={{ textDecoration: 'none', ...this.props.style }}>
-                <div
-                    onClick={this.props.onClick.bind(this)}
-                    className={`mx-auto ${this.props.className}`}
-                    style={menuItemStyles}
-                    onMouseEnter={this._onToggleHover.bind(this, true)}
-                    onMouseLeave={this._onToggleHover.bind(this, false)}
-                >
-                    {this.props.children}
-                </div>
-            </Link>
-        );
-    }
-    private _onToggleHover(isHovering: boolean): void {
-        this.setState({
-            isHovering,
-        });
-    }
-}
-- 
cgit v1.2.3

