11import { PropsWithChildren } from 'react' ;
2- import { Title , Flex , Stack , Switch , Collapse , Group } from '@mantine/core' ;
2+ import { Title , Flex , Stack , Switch , Collapse , Group , Badge } from '@mantine/core' ;
3+ import { Button } from '@ui/button' ;
34
45import useStyles from './DestinationItem.styles' ;
5- import { colors } from '@config' ;
6+ import { colors , ROUTES } from '@config' ;
67import { TooltipLink } from '@components/guide-point' ;
8+ import { LockIcon } from '@assets/icons/Lock.icon' ;
79
810interface DestinationItemProps extends PropsWithChildren {
911 title : string ;
@@ -26,36 +28,76 @@ export const DestinationItem = ({
2628 const { classes } = useStyles ( ) ;
2729
2830 return (
29- < Stack
30- className = { classes . container }
31- p = "lg"
32- spacing = { children ? 'sm' : 0 }
33- data-disabled = { disabled }
34- style = { {
35- pointerEvents : disabled ? 'none' : 'auto' ,
36- } }
37- >
38- < Flex justify = "space-between" align = "center" >
39- < Stack spacing = { 2 } >
40- < Group spacing = "xs" align = "center" noWrap >
41- < Title color = { disabled ? colors . TXTSecondaryDark : colors . white } order = { 4 } >
42- { title }
43- </ Title >
44- { tooltipLink && < TooltipLink link = { tooltipLink } iconSize = "md" /> }
45- </ Group >
46- < Title order = { 5 } fw = "normal" color = { colors . TXTSecondaryDark } >
47- { subtitle }
48- </ Title >
31+ < >
32+ { disabled ? (
33+ < Flex
34+ direction = "row"
35+ gap = "sm"
36+ align = "center"
37+ p = "xs"
38+ bg = { colors . BGSecondaryDark }
39+ style = { {
40+ border : `1px solid ${ colors . StrokeDark } ` ,
41+ } }
42+ >
43+ < LockIcon size = "xl" color = "#868e96" />
44+ < Stack spacing = { 5 } w = "100%" align = "flex-start" >
45+ < Badge color = "orange" > Premium Feature</ Badge >
46+ < div >
47+ < Title color = { disabled ? colors . TXTSecondaryDark : colors . white } order = { 4 } >
48+ { title }
49+ </ Title >
50+ < Title order = { 5 } fw = "normal" color = { colors . TXTSecondaryDark } >
51+ { subtitle }
52+ </ Title >
53+ </ div >
54+ </ Stack >
55+ < Button
56+ component = "a"
57+ size = "xs"
58+ href = { ROUTES . EXPLORE_PLANS }
59+ onClick = { ( ) => {
60+ window . location . href = ROUTES . EXPLORE_PLANS ;
61+
62+ return false ;
63+ } }
64+ >
65+ Upgrade
66+ </ Button >
67+ </ Flex >
68+ ) : (
69+ < Stack
70+ className = { classes . container }
71+ p = "lg"
72+ spacing = { children ? 'sm' : 0 }
73+ data-disabled = { disabled }
74+ style = { {
75+ pointerEvents : disabled ? 'none' : 'auto' ,
76+ } }
77+ >
78+ < Flex justify = "space-between" align = "center" >
79+ < Stack spacing = { 2 } >
80+ < Group spacing = "xs" align = "center" noWrap >
81+ < Title color = { disabled ? colors . TXTSecondaryDark : colors . white } order = { 4 } >
82+ { title }
83+ </ Title >
84+ { tooltipLink && < TooltipLink link = { tooltipLink } iconSize = "md" /> }
85+ </ Group >
86+ < Title order = { 5 } fw = "normal" color = { colors . TXTSecondaryDark } >
87+ { subtitle }
88+ </ Title >
89+ </ Stack >
90+ < Switch
91+ color = { disabled ? 'gray' : colors . blue }
92+ checked = { ! ! active }
93+ onChange = { disabled ? undefined : onClick }
94+ disabled = { disabled }
95+ />
96+ </ Flex >
97+ { ! disabled && < Collapse in = { ! ! active } > { children } </ Collapse > }
4998 </ Stack >
50- < Switch
51- color = { disabled ? 'gray' : colors . blue }
52- checked = { ! ! active }
53- onChange = { disabled ? undefined : onClick }
54- disabled = { disabled }
55- />
56- </ Flex >
57- { ! disabled && < Collapse in = { ! ! active } > { children } </ Collapse > }
58- </ Stack >
99+ ) }
100+ </ >
59101 ) ;
60102} ;
61103
0 commit comments