varabyte / kobweb-intellij-plugin

An official IntelliJ IDE plugin to include Kobweb-specific enhancements and understanding to your project
Apache License 2.0
10 stars 2 forks source link

Show an informative message if someone tries to create a non top-level restricted style #47

Open bitspittle opened 5 months ago

bitspittle commented 5 months ago

This code

Button(colorScheme = ButtonColorScheme(object : ColorScheme { ... })

should inform users that ButtonColorScheme is a restricted CSS style type and must be instantiated as a singleton so Kobweb can find and register it, like so:

val CustomColorScheme = ButtonColorScheme(object : ColorScheme { ... })
Button(colorScheme = CustomColorScheme))