diff --git a/package-lock.json b/package-lock.json index 4b2883d..1a38d39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "react-dom": "^16.13.1", "react-router": "^4.3.1", "react-router-dom": "^4.3.1", + "react-shadow": "^20.4.0", "react-toggle": "^4.0.2" }, "devDependencies": { @@ -7851,6 +7852,11 @@ "ms": "^2.0.0" } }, + "node_modules/humps": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/humps/-/humps-2.0.1.tgz", + "integrity": "sha512-E0eIbrFWUhwfXJmsbdjRQFQPrl5pTEoKlz163j1mTqqUnU9PgR4AgB8AIITzuB3vLBdxZXyZ9TDIrwB2OASz4g==" + }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -9794,6 +9800,19 @@ "react": ">=15" } }, + "node_modules/react-shadow": { + "version": "20.4.0", + "resolved": "https://registry.npmjs.org/react-shadow/-/react-shadow-20.4.0.tgz", + "integrity": "sha512-sirvAmFja7Ss6MoyQbKWxaQ5IDTAW3Za3Tvegylfr5jXnwKZObHRIyiatefeNlskoGKfuPaZ8DNT052T0SUGcg==", + "dependencies": { + "humps": "^2.0.1" + }, + "peerDependencies": { + "prop-types": "^15.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-toggle": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/react-toggle/-/react-toggle-4.0.2.tgz", @@ -17373,6 +17392,11 @@ "ms": "^2.0.0" } }, + "humps": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/humps/-/humps-2.0.1.tgz", + "integrity": "sha512-E0eIbrFWUhwfXJmsbdjRQFQPrl5pTEoKlz163j1mTqqUnU9PgR4AgB8AIITzuB3vLBdxZXyZ9TDIrwB2OASz4g==" + }, "iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -18849,6 +18873,14 @@ "warning": "^4.0.1" } }, + "react-shadow": { + "version": "20.4.0", + "resolved": "https://registry.npmjs.org/react-shadow/-/react-shadow-20.4.0.tgz", + "integrity": "sha512-sirvAmFja7Ss6MoyQbKWxaQ5IDTAW3Za3Tvegylfr5jXnwKZObHRIyiatefeNlskoGKfuPaZ8DNT052T0SUGcg==", + "requires": { + "humps": "^2.0.1" + } + }, "react-toggle": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/react-toggle/-/react-toggle-4.0.2.tgz", diff --git a/package.json b/package.json index 35dc193..0813c99 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "react-dom": "^16.13.1", "react-router": "^4.3.1", "react-router-dom": "^4.3.1", + "react-shadow": "^20.4.0", "react-toggle": "^4.0.2" }, "devDependencies": { diff --git a/src/content/components/TranslatePanel.js b/src/content/components/TranslatePanel.js index c46a6dc..d822620 100644 --- a/src/content/components/TranslatePanel.js +++ b/src/content/components/TranslatePanel.js @@ -1,6 +1,7 @@ import browser from "webextension-polyfill"; import React, { Component } from "react"; import ReactDOM from "react-dom"; +import root from "react-shadow"; import { getSettings } from "src/settings/settings"; import "../styles/TranslatePanel.scss"; import { getBackgroundColor, getCandidateFontColor, getResultFontColor } from "../../settings/defaultColors"; @@ -204,10 +205,10 @@ export default class TranslatePanel extends Component { ref="panel" style={panelStyles} > - {translationApi === "sonaveeb" && ( )}
{splitLine(resultText)}
) @@ -235,7 +236,7 @@ export default class TranslatePanel extends Component { )} )} -{splitLine(resultText)}
) @@ -48,6 +50,6 @@ export default props => {