fix: move encrypted icon to excalidraw-app add separate animation for renderFooter prop (#3577)

* fix: move encrypted icon to excalidraw-app

* use grid & separate animation for custom footer

* update docs

* fix
This commit is contained in:
Aakansha Doshi 2021-05-15 14:49:58 +05:30 committed by GitHub
parent 78da4c075e
commit 6271a031a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 133 additions and 103 deletions

View file

@ -52,6 +52,10 @@ import {
} from "./data/localStorage";
import CustomStats from "./CustomStats";
import { restoreAppState, RestoredDataState } from "../data/restore";
import { Tooltip } from "../components/Tooltip";
import { shield } from "../components/icons";
import "./index.scss";
const languageDetector = new LanguageDetector();
languageDetector.init({
@ -328,6 +332,20 @@ const ExcalidrawWrapper = () => {
const renderFooter = useCallback(
(isMobile: boolean) => {
const renderEncryptedIcon = () => (
<a
className="encrypted-icon tooltip"
href="https://blog.excalidraw.com/end-to-end-encryption/"
target="_blank"
rel="noopener noreferrer"
aria-label={t("encrypted.link")}
>
<Tooltip label={t("encrypted.tooltip")} position="above" long={true}>
{shield}
</Tooltip>
</a>
);
const renderLanguageList = () => (
<LanguageList
onChange={(langCode) => {
@ -370,7 +388,12 @@ const ExcalidrawWrapper = () => {
</div>
);
}
return renderLanguageList();
return (
<>
{renderEncryptedIcon()}
{renderLanguageList()}
</>
);
},
[langCode],
);