robsontenorio / mary

Laravel Blade UI Components for Livewire 3
https://mary-ui.com
Other
990 stars 117 forks source link

Add 'disabled' option to Radio component options #508

Closed bimsonz closed 2 months ago

bimsonz commented 3 months ago

Allow an option set to 'disable' an option by defining disabled === true

bimsonz commented 3 months ago

Considered adding the ability to define the disabled key but it felt a little unnecessary... what do you think ?

robsontenorio commented 3 months ago

Have you tested with this syntax on your PR ?:disabled=“$myVar”

bimsonz commented 3 months ago

To be honest, im not that familiar with that syntax, is it used with Alpine ? I've not tested anything outside of the blade implementation. Happy to if you can point me in that direction

robsontenorio commented 3 months ago

Any blade component variable can be bound to external variables . Try it $myVar as true/false and see.

bimsonz commented 3 months ago

Is this suggestion to cater for disabling the whole radio component? My intension is to add the ability for specific options to be disabled.

Sorry, excuse my confusion here!

robsontenorio commented 2 months ago

Thanks!