From f7b494ccf2a90d8c54df760e5142f34f11f8cf3c Mon Sep 17 00:00:00 2001
From: Matthew Shao <me@matshao.com>
Date: Mon, 7 Aug 2017 11:05:02 +0800
Subject: [web] Add HideInStatic Component

HideInStaic compoent will check the MITMWEB_STATIC var, and hide the
responsive components in static mode.
---
 web/src/js/components/common/HideInStatic.jsx | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 web/src/js/components/common/HideInStatic.jsx

(limited to 'web/src/js/components/common/HideInStatic.jsx')

diff --git a/web/src/js/components/common/HideInStatic.jsx b/web/src/js/components/common/HideInStatic.jsx
new file mode 100644
index 00000000..9f515c97
--- /dev/null
+++ b/web/src/js/components/common/HideInStatic.jsx
@@ -0,0 +1,5 @@
+import React from 'react'
+
+export default function HideInStatic({className, children }) {
+    return MITMWEB_STATIC ? null : ( <div className={className}>{children}</div> )
+}
-- 
cgit v1.2.3

