11import React from "react" ;
22import type { ModalProps } from "@mantine/core" ;
3- import {
4- Button ,
5- Modal ,
6- Flex ,
7- Stack ,
8- Title ,
9- CloseButton ,
10- FocusTrap ,
11- Image ,
12- Divider ,
13- List ,
14- ThemeIcon ,
15- Anchor ,
16- } from "@mantine/core" ;
3+ import { Button , Modal , FocusTrap , Image , Text , Group , Divider } from "@mantine/core" ;
174import Cookie from "js-cookie" ;
18- import { LuCheckCircle } from "react-icons/lu" ;
195import useConfig from "src/store/useConfig" ;
206
217export const UpgradeModal = ( { opened, onClose } : ModalProps ) => {
@@ -28,80 +14,54 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
2814
2915 return (
3016 < Modal
31- size = "700 "
17+ size = "500 "
3218 opened = { opened }
3319 onClose = { handleCloseModal }
3420 zIndex = { 1001 }
3521 centered
36- radius = "lg"
37- withCloseButton = { false }
38- styles = { { body : { padding : 0 } } }
22+ radius = "md"
3923 overlayProps = { { blur : 2 } }
24+ withCloseButton = { false }
25+ closeOnClickOutside = { false }
4026 >
4127 < FocusTrap . InitialFocus />
42- < Flex >
43- < Image
44- src = { `/assets/hp-${ darkmodeEnabled ? "dark" : "light" } .png` }
45- alt = "diagram"
46- maw = { 300 }
47- height = "auto"
48- style = { { objectPosition : "left" } }
49- />
50- < Divider orientation = "vertical" />
51- < Stack gap = "24" px = "40" py = "20" w = "100%" >
52- < Flex justify = "space-between" mr = "-20" >
53- < Title c = "bright" fw = "500" fz = "24" >
54- Try the new editor!
55- </ Title >
56- < CloseButton onClick = { handleCloseModal } />
57- </ Flex >
58- < List
59- spacing = "4"
60- icon = {
61- < ThemeIcon variant = "transparent" radius = "xl" size = "sm" color = "green" >
62- < LuCheckCircle size = "16" />
63- </ ThemeIcon >
64- }
65- >
66- < List . Item > Large data support</ List . Item >
67- < List . Item > Custom themes</ List . Item >
68- < List . Item > Cloud Storage</ List . Item >
69- < List . Item > Compare Data</ List . Item >
70- < List . Item > AI-Filter</ List . Item >
71- < List . Item > API Integration</ List . Item >
72- < List . Item >
73- < Anchor
74- href = "https://chromewebstore.google.com/detail/todiagram/gpcnkpjdmgihedngamkhendifclghjhn"
75- target = "_blank"
76- rel = "noopener"
77- c = "inherit"
78- td = "underline"
79- >
80- Chrome Extension
81- </ Anchor >
82- </ List . Item >
83- </ List >
84- < Button
85- component = "a"
86- href = "https://todiagram.com/editor?utm_source=jsoncrack& utm_medium = upgrade_modal "
87- target = "_blank"
88- color = "green"
89- size = "md"
90- radius = "md"
91- fullWidth
92- leftSection = {
93- < Image
94- src = "https://todiagram.com/logo.svg"
95- alt = "logo"
96- w = { 20 }
97- style = { { filter : "grayscale(1) brightness(0) invert(1)" } }
98- />
99- }
100- >
101- Open Editor
102- </ Button >
103- </ Stack >
104- </ Flex >
28+ < Image
29+ src = { `/assets/diagram-${ darkmodeEnabled ? "dark" : "light" } .png` }
30+ alt = "diagram"
31+ width = "auto"
32+ style = { {
33+ filter : "drop-shadow(4px -3px 3px rgba(0, 0, 0, 0.2))" ,
34+ } }
35+ />
36+ < Divider mx = "-md" />
37+ < Text ta = "center" fz = "md" mt = "lg" >
38+ We've been working on something big -{ " " }
39+ < Text component = "span" fw = "bold" inherit >
40+ Ready to explore?
41+ </ Text >
42+ </ Text >
43+ < Group mt = "md" justify = "space-between" >
44+ < Button variant = "default" size = "md" onClick = { handleCloseModal } >
45+ Not now
46+ </ Button >
47+ < Button
48+ component = "a"
49+ href = "https://todiagram.com/editor?utm_source=jsoncrack& utm_medium = upgrade_modal "
50+ target = "_blank"
51+ color = "red"
52+ size = "md"
53+ leftSection = {
54+ < Image
55+ src = "https://todiagram.com/logo.svg"
56+ alt = "logo"
57+ w = { 20 }
58+ style = { { filter : "grayscale(1) brightness(0) invert(1)" } }
59+ />
60+ }
61+ >
62+ Try ToDiagram!
63+ </ Button >
64+ </ Group >
10565 </ Modal >
10666 ) ;
10767} ;
0 commit comments