client/src/components/SlateEditor/BlockButton.js
author ymh <ymh.work@gmail.com>
Thu, 06 Dec 2018 00:46:53 +0100
changeset 195 669b563563f5
parent 173 0e6703cd0968
permissions -rw-r--r--
upgrade dependencies versions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
173
0e6703cd0968 Correct the Note editor.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import React from 'react';
0e6703cd0968 Correct the Note editor.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import { withNamespaces } from 'react-i18next';
0e6703cd0968 Correct the Note editor.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
0e6703cd0968 Correct the Note editor.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
export default withNamespaces("")(({icon, isActive, onMouseDown, t}) => (
0e6703cd0968 Correct the Note editor.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
  <span className={"button sticky-top" + ((!isActive)?" text-primary":" text-dark")} onMouseDown={onMouseDown} data-active={isActive} title={t("common."+icon)} >
0e6703cd0968 Correct the Note editor.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
    <span className="material-icons">{icon}</span>
0e6703cd0968 Correct the Note editor.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
  </span>
0e6703cd0968 Correct the Note editor.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
));