-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This re-introduces a more global way to set styling properties, but this time via a new `LocalHazeStyle` composition local. As we now have 3 different sources for styling information, we now have documented precedence rules. Also made the `Modifier.Node` implementations public, for more custom use cases. To quickly illustrate all of the ways to set styling properties: ### LocalHazeStyle ```kotlin CompositionLocalProvider(LocalHazeStyle provides fooStyle) { Box( Modifier.hazeChild(state = hazeState) ) } ``` ### style on hazeChild ```kotlin Box( Modifier.hazeChild(state = hazeState, style = fooStyle) ) // or... (these are equivalent) Box( Modifier.hazeChild(state = hazeState) { style = fooStyle } ) ``` ### Individual styling properties ```kotlin Box( Modifier.hazeChild(state = hazeState) { tints = listOf(...) } ) ``` Fixes #340
- Loading branch information
1 parent
b90d504
commit 9c411e7
Showing
17 changed files
with
532 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.51 MB
haze/screenshots/android/HazeScreenshotTest.creditCard_compositionLocalStyle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+878 KB
...screenshots/android/HazeScreenshotTest.creditCard_compositionLocalStyle[28].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+818 KB
haze/screenshots/desktop/HazeScreenshotTest.creditCard_compositionLocalStyle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.