Open eddnav opened 5 months ago
@eddnav My current thinking on this subject is that we should probably prefer keeping the API surface simple as long as there's a reasonable way to accomplish what a developers is trying to do. Everything in a design system can be exposed as part of a component preview itself and that should accomplish what you are hoping to get out of it. For example, one could create a preview like this to demonstrate the shadows
@ShowkaseComposable(name= "High", group = "Shadows")
@Preview
fun HighShadow() {
Box(
modifier = Modifier.size(64.dp).shadow(CustomTheme.shadows.high)
) {...}
}
If you squint enough, everything can be a component preview and this is true even for annotations like @ShowkaseColor
and @ShowkaseTypography
. Hope this makes sense
@vinaygaba sorry for the super delayed reply, but I agree, however, it'd be really nice if we could then opt-out of the permutations for RTL, scaling and so on.
I understand the decision behind specific annotations for each type, but it would be nice to also have a custom (can behave just like
@ShowkaseComposable
, just not grouped under "Components") annotation to allow more flexibility. An example of this is shadows. My design system has custom drop shadows, not elevation and I would like to display them in Showkase.