Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show actions for handling a private val ComponentStyle/ComponentVariant/Keyframes #27

Open
bitspittle opened this issue Jan 22, 2024 · 0 comments
Labels
IDE: Action An IDE action (something a user might tie to a keyboard shortcut) IDE: Inspection Some information that should be surfaced to the user (tooltip, notification, lint warning)
Milestone

Comments

@bitspittle
Copy link
Contributor

See the important note in this section: https://github.com/varabyte/kobweb?tab=readme-ov-file#componentstyle

In other words, detect this case:

private val SomeStyle by ComponenStyle

then put a warning on the "private" keyword and add two actions the user can take

  1. Remove the "private" modifier
  2. Introduce an initSilk method (or add to the end of an existing one if already defined)
@Suppress("PRIVATE_COMPONENT_STYLE")
private val SomeCustomStyle by ComponentStyle { /* ... */ }

@InitSilk
fun registerPrivateStyle(ctx: InitSilkContext) {
  ctx.theme.registerComponentStyle(SomeCustomStyle)
}
@bitspittle bitspittle added IDE: Action An IDE action (something a user might tie to a keyboard shortcut) IDE: Inspection Some information that should be surfaced to the user (tooltip, notification, lint warning) labels Jan 22, 2024
@bitspittle bitspittle added this to the 1.0 milestone Jan 22, 2024
@bitspittle bitspittle changed the title Show actions for handling a private val ComponentStyle Show actions for handling a private val ComponentStyle/ComponentVariant/Keyframes Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE: Action An IDE action (something a user might tie to a keyboard shortcut) IDE: Inspection Some information that should be surfaced to the user (tooltip, notification, lint warning)
Projects
None yet
Development

No branches or pull requests

1 participant