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

Improve OverrideDarkMode kdocs #552

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,22 @@ public val LocalConsoleTextStyle: ProvidableCompositionLocal<TextStyle> =
error("No ConsoleTextStyle provided. Have you forgotten the theme?")
}

/** Overrides the dark mode for the current composition scope. */
/**
* Overrides the [isDark] value for the [content]. It is used to inject a
* different dark mode style in a sub-tree.
*
* Note: this does _not_ change the theme. If you want to change the theme,
* you need to do it by yourself. For example, in standalone:
* ```kotlin
* IntUiTheme(isDark = false) {
* Text("I am light")
*
* IntUiTheme(isDark = true) {
* Text("I am dark")
* }
* }
* ```
*/
@Composable
public fun OverrideDarkMode(
isDark: Boolean,
Expand Down