@@ -6,19 +6,15 @@ import {
66 CardContent ,
77 CardFooter ,
88} from '@remoteoss/remote-flows/internals' ;
9- import {
10- RadioGroup ,
11- RadioGroupItem ,
12- cn ,
13- } from '@remoteoss/remote-flows/internals' ;
9+ import { cn } from '@remoteoss/remote-flows/internals' ;
1410import { Check } from 'lucide-react' ;
1511
1612interface PricingPlanCardProps {
1713 title : React . ReactNode ;
1814 description : React . ReactNode ;
1915 features : string [ ] ;
2016 selected ?: boolean ;
21- onSelect ?: ( ) => void ;
17+ onSelect ?: ( value : string ) => void ;
2218 value : string ;
2319}
2420
@@ -36,7 +32,9 @@ export function PricingPlanCard({
3632 'px-4 py-4 border-dashed border-[#9AA6B2] cursor-pointer transition-all' ,
3733 selected && 'border-solid border-[#9AA6B2] ring-2 ring-[#9AA6B2]' ,
3834 ) }
39- onClick = { onSelect }
35+ onClick = { ( ) => {
36+ onSelect ?.( value ) ;
37+ } }
4038 >
4139 < CardHeader className = 'pb-4' >
4240 < CardTitle className = 'text-xl font-bold' > { title } </ CardTitle >
@@ -56,17 +54,38 @@ export function PricingPlanCard({
5654 </ CardContent >
5755
5856 < CardFooter className = 'pt-4' >
59- < RadioGroup value = { selected ? value : undefined } className = 'w-full' >
60- < div className = 'flex items-center gap-2' >
61- < RadioGroupItem value = { value } id = { value } />
62- < label
63- htmlFor = { value }
64- className = 'cursor-pointer text-sm font-medium'
65- >
66- Select plan
67- </ label >
57+ < div className = 'flex items-center gap-3 w-full' >
58+ < div
59+ style = { {
60+ width : '20px' ,
61+ height : '20px' ,
62+ borderRadius : '50%' ,
63+ border : `2px solid ${ selected ? '#9AA6B2' : '#D1D5DB' } ` ,
64+ backgroundColor : selected ? '#9AA6B2' : '#FFFFFF' ,
65+ display : 'flex' ,
66+ alignItems : 'center' ,
67+ justifyContent : 'center' ,
68+ flexShrink : 0 ,
69+ transition : 'all 0.2s' ,
70+ } }
71+ >
72+ { selected && (
73+ < Check
74+ className = 'text-white'
75+ style = { { width : '12px' , height : '12px' } }
76+ />
77+ ) }
6878 </ div >
69- </ RadioGroup >
79+ < span
80+ style = { {
81+ fontSize : '14px' ,
82+ fontWeight : 500 ,
83+ color : selected ? '#364452' : '#6B7280' ,
84+ } }
85+ >
86+ Select plan
87+ </ span >
88+ </ div >
7089 </ CardFooter >
7190 </ Card >
7291 ) ;
0 commit comments