refactor(preview): replace @Preview with @ComponentPreview and update dependencies
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Failing after 2m56s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Failing after 3m12s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 1m19s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 2m19s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Failing after 2m56s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Failing after 3m12s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 1m19s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 2m19s
- Replaced all occurrences of `@Preview` with the standardized `@ComponentPreview` annotation for a consistent preview experience across modules. - Added `compose.uiTooling` dependency to `core/design-system` for enhanced preview functionality. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
@@ -26,5 +26,8 @@ kotlin {
|
||||
implementation(compose.components.resources)
|
||||
implementation(libs.bundles.kmp.common)
|
||||
}
|
||||
jvmMain.dependencies {
|
||||
implementation(compose.uiTooling)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package at.mocode.wui.preview
|
||||
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
|
||||
/**
|
||||
* A standardized preview annotation for UI components.
|
||||
*
|
||||
* This annotation provides a consistent size and background for component previews.
|
||||
* It helps in maintaining a uniform look for previews across the project.
|
||||
*
|
||||
* Groups can be used to organize previews in the IDE.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* @ComponentPreview
|
||||
* @Composable
|
||||
* fun MyButtonPreview() {
|
||||
* MyButton()
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Preview(showBackground = true, widthDp = 800, heightDp = 400)
|
||||
annotation class ComponentPreview
|
||||
Reference in New Issue
Block a user