From da0864b81bf36436bdaa6f7e9bb01e19eb29c192 Mon Sep 17 00:00:00 2001 From: DD Date: Tue, 20 Mar 2018 10:48:35 -0400 Subject: [PATCH] Add a text edit area --- src/components/text-mode/text-mode.css | 15 +++++++ src/components/text-mode/text-mode.jsx | 31 +++++++++------ src/containers/text-mode.jsx | 8 +++- src/helper/tools/text-tool.js | 55 ++++++++++++++++++-------- 4 files changed, 80 insertions(+), 29 deletions(-) create mode 100644 src/components/text-mode/text-mode.css diff --git a/src/components/text-mode/text-mode.css b/src/components/text-mode/text-mode.css new file mode 100644 index 00000000..a2e4a958 --- /dev/null +++ b/src/components/text-mode/text-mode.css @@ -0,0 +1,15 @@ +.text-area { + background: transparent; + border: none; + display: none; + font-family: Times; + font-size: 30px; + left: 0; + outline: none; + overflow: hidden; + position: absolute; + resize: none; + top: 0; + white-space: nowrap; + z-index: 1; +} \ No newline at end of file diff --git a/src/components/text-mode/text-mode.jsx b/src/components/text-mode/text-mode.jsx index 747f68b9..f4234873 100644 --- a/src/components/text-mode/text-mode.jsx +++ b/src/components/text-mode/text-mode.jsx @@ -3,23 +3,32 @@ import PropTypes from 'prop-types'; import ToolSelectComponent from '../tool-select-base/tool-select-base.jsx'; import textIcon from './text.svg'; +import styles from './text-mode.css'; const TextModeComponent = props => ( - +
+ + +