From ceed14452714cca585aaecc5378e4545f01fc2dd Mon Sep 17 00:00:00 2001 From: VeraRibeiro Date: Tue, 20 Sep 2022 12:02:22 +0100 Subject: [PATCH] styles --- src/editorManager/components/TextEditor.tsx | 16 ++-------- .../components/styles.module.css | 13 ++++++++ yarn.lock | 32 +++++++++---------- 3 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 src/editorManager/components/styles.module.css diff --git a/src/editorManager/components/TextEditor.tsx b/src/editorManager/components/TextEditor.tsx index a58e4a7..c1f2360 100755 --- a/src/editorManager/components/TextEditor.tsx +++ b/src/editorManager/components/TextEditor.tsx @@ -13,19 +13,7 @@ import clsx from 'clsx' import { GRID_RESIZE, useApiEventHandler } from '../../api' import EditorContainer from './EditorContainer' import { createDefaultPaperProps } from './createDefaultPaperProps' - -const input = { - width: '100%', - height: '100%', - resize: 'none', - overflow: 'auto', - border: 0, - outline: 0, - '&:focus': { - border: 0, - outline: 0, - }, -} +import styles from './styles.module.css' export const TextEditor = forwardRef( ( @@ -114,7 +102,7 @@ export const TextEditor = forwardRef( aria-label="text apollo editor" minRows={1} maxLength={maxLength} - className={clsx(input, additionalProps?.className, theme?.editorClass)} + className={clsx(styles.input, additionalProps?.className, theme?.editorClass)} style={additionalProps?.style} /> diff --git a/src/editorManager/components/styles.module.css b/src/editorManager/components/styles.module.css new file mode 100644 index 0000000..8ea803e --- /dev/null +++ b/src/editorManager/components/styles.module.css @@ -0,0 +1,13 @@ +.input { + width: 100%; + height: 100%; + resize: none; + overflow: auto; + border: 0; + outline: 0; +} + +.input:focus { + border: 0; + outline: 0; +} diff --git a/yarn.lock b/yarn.lock index 64be0f8..37fdd93 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6768,16 +6768,16 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= +clsx@^1.0.4, clsx@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== + clsx@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== -clsx@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" - integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -8016,7 +8016,7 @@ dom-converter@^0.2.0: dependencies: utila "~0.4" -dom-helpers@^5.0.1, dom-helpers@^5.2.0: +dom-helpers@^5.0.1, dom-helpers@^5.1.3, dom-helpers@^5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.1.tgz#d9400536b2bf8225ad98fe052e029451ac40e902" integrity sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA== @@ -12650,11 +12650,6 @@ memfs@^3.1.2, memfs@^3.4.3: dependencies: fs-monkey "1.0.3" -memoize-one@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-3.1.1.tgz#ef609811e3bc28970eac2884eece64d167830d17" - integrity sha512-YqVh744GsMlZu6xkhGslPSqSurOv6P+kLN2J3ysBZfagLcL5FdRK/0UpgLoL8hwjjEvvAVkjJZyFP+1T6p1vgA== - memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a" @@ -15366,12 +15361,17 @@ react-transition-group@^4.4.5: loose-envify "^1.4.0" prop-types "^15.6.2" -react-virtualized@^8.22.3: - version "10.0.0-alpha.17" - resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-10.0.0-alpha.17.tgz#e28c22c15ccfdba212d6cb19cb1f4c0d3b9dc44f" - integrity sha512-C1hfqio63CIBkYCHbw0Ly33hHZflaKXQD+z7ImHavujWoEGm49BI5Lf9pPvzn7miSkzv6BAqIEfCB8U4AJA0Bg== +react-virtualized@^9.22.3: + version "9.22.3" + resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-9.22.3.tgz#f430f16beb0a42db420dbd4d340403c0de334421" + integrity sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw== dependencies: - memoize-one "^3.1.1" + "@babel/runtime" "^7.7.2" + clsx "^1.0.4" + dom-helpers "^5.1.3" + loose-envify "^1.4.0" + prop-types "^15.7.2" + react-lifecycles-compat "^3.0.4" react@^17.0.0: version "17.0.2"