client/src/components/SlateEditor/MarkButton.js
changeset 173 0e6703cd0968
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/components/SlateEditor/MarkButton.js	Fri Nov 16 11:19:13 2018 +0100
@@ -0,0 +1,17 @@
+import React from 'react';
+import { withNamespaces } from 'react-i18next';
+
+/**
+ * Render a mark-toggling toolbar button.
+ *
+ * @param {String} type
+ * @param {String} icon
+ * @return {Element}
+ */
+export default withNamespaces("")(({icon, isActive, onMouseDown, t}) => (
+  <span className={"button sticky-top" + ((!isActive)?" text-primary":" text-dark")} onMouseDown={onMouseDown} data-active={isActive} title={t("common." + icon)} >
+
+    <span className="material-icons">{icon}</span>
+  </span>
+));
+