kobweb icon indicating copy to clipboard operation
kobweb copied to clipboard

There should be a way to say a whole section of widgets is disabled

Open bitspittle opened this issue 2 years ago • 0 comments

e.g.

Approach #1:

Button(enabled = false) { ... }
Button(enabled = false) { ... }

Approach #2:

Disabled {
   Button { ... }
   Button { ... }
}

With this, you could have a whole container that gets disabled.

All Silk widgets would have to change their logic to change enabled into a Boolean? (defaults to null) and then check for a CompositionLocalProvider, something like val actuallyEnabled = enabled ?: !DisabledProvider.current

bitspittle avatar May 24 '23 23:05 bitspittle