forked from SpockExtension/Spock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.tsx
28 lines (24 loc) · 798 Bytes
/
popup.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { ChakraProvider, Flex } from "@chakra-ui/react";
import SignMessage from "~components/aggr";
import PasswordModal from "~components/Lock";
import "~styling/blur.css";
import { useState } from 'react';
function App() {
const [isPasswordCorrect, setIsPasswordCorrect] = useState(false);
const handlePasswordMatch = () => {
setIsPasswordCorrect(true);
};
return (
<ChakraProvider>
<Flex display={isPasswordCorrect ? "none" : "inline"} position="absolute" top="40%" left="5%" zIndex="99">
<PasswordModal onPasswordMatch={handlePasswordMatch} />
</Flex>
<div className={isPasswordCorrect ? "" : "blur"}>
<div style={{ padding: "50px" }}>
<SignMessage />
</div>
</div>
</ChakraProvider>
);
}
export default App;