composablehorizons / compose-examples

This repository it used to keep track of user feedback, issues and suggestions for https://composablesui.com
https://composablesui.com
10 stars 0 forks source link

[Component: Product list with carousel on mobile] How do I import ComposeTheme? #11

Closed javac9 closed 1 month ago

javac9 commented 1 month ago

This component contains several ocurrences of this line: style = ComposeTheme.textStyles.base.copy(fontWeight = FontWeight.Medium)

I cannot import ComposeTheme. How do I overcome that?

alexstyl commented 1 month ago

ComposeTheme is a CMP library that sets up defaults such as the text styles you see there. You can import it by adding the dependency:

dependencies {
    implementation("com.composables:composetheme:1.2.0-alpha")
}

More info at https://github.com/composablehorizons/composetheme

If you do not want to use it, you can change it to your MaterialTheme.typography.XXX theme :)

alexstyl commented 1 month ago

PS: the fact you were not able to tell how to add it is an issue from my side. I will make sure that all examples contain the required imports later today

javac9 commented 1 month ago

Thanks, imported successfully