File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,10 +16,11 @@ const id = useId();
1616 <RadioGroupItem
1717 :id
1818 :value =" value"
19+ :disabled
1920 class ="
2021 shadow-ui-xs mt-0.5 size-4 cursor-default rounded-full
2122 focus:focus-outline border border-gray-400/75 dark:border-none bg-white outline-hidden
22- data-[state=checked]:border-ui-accent
23+ data-[state=checked]:border-ui-accent data-[disabled]:opacity-50
2324 dark:bg-gray-400 dark:data-[state=checked]:border-none dark:data-[state=checked]:bg-gray-300
2425 "
2526 >
@@ -31,7 +32,7 @@ const id = useId();
3132 "
3233 />
3334 </RadioGroupItem >
34- <label class =" flex flex-col" :for =" id" >
35+ <label class =" flex flex-col" :class = " { 'opacity-50': disabled } " : for =" id" >
3536 <span class =" text-sm font-normal text-gray-600 antialiased dark:text-gray-200" >
3637 <slot >{{ label || value }}</slot >
3738 </span >
Original file line number Diff line number Diff line change 222222 </div >
223223 </section >
224224
225+ <section class =" space-y-4" >
226+ <ui-heading size =" lg" >Disabled Radio Items</ui-heading >
227+ <ui-radio-group name =" favorite" label =" Choose your favorite Star Wars movie" >
228+ <ui-radio-item label =" A New Hope" value =" ep4" />
229+ <ui-radio-item label =" Empire Strikes Back" value =" ep5" />
230+ <ui-radio-item label =" Return of the Jedi" value =" ep6" />
231+ <ui-radio-item disabled label =" the Force Awakens" value =" ep7" />
232+ <ui-radio-item disabled label =" The Last Jedi" value =" ep8" />
233+ <ui-radio-item disabled label =" The Rise of Skywalker" value =" ep9" />
234+ </ui-radio-group >
235+ </section >
236+
225237 <section class =" space-y-4" >
226238 <ui-heading size =" lg" >Select</ui-heading >
227239 <div class =" flex" >
You can’t perform that action at this time.
0 commit comments