varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.46k stars 65 forks source link

Allow chaining variants #121

Closed bitspittle closed 2 years ago

bitspittle commented 2 years ago

So you could do something like

Link(variant = UndecoratedLinkVariant.then(UncoloredLinkVariant)) { ... }
bitspittle commented 2 years ago

This would probably require extracting out a simple interface for ComponentVariant, with addStyles and then, and then having SingleComponentVariant and CompositeComponentVariant implementations.

bitspittle commented 2 years ago

Marked this as good first issue because it's probably a relatively straightforward change and could be a good way for a new contributor to stick their hand into one of the more interesting parts of the Kobweb codebase, but I would probably peer program this one, because the surrounding code is a little scary AND maybe this is harder than I'm thinking.

bitspittle commented 2 years ago

This was fixed with 3e9223373bcffeca5e17dcb48e1d5fb26b0d52dd