From 08c6e334ca4ab25d54e4ea088a714268369814ad Mon Sep 17 00:00:00 2001 From: Noyal Jose Date: Wed, 28 Dec 2022 13:18:50 +0530 Subject: [PATCH] Update themeadapter-material.md --- docs/themeadapter-material.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/themeadapter-material.md b/docs/themeadapter-material.md index c2b4d9e68..ef4c99dba 100644 --- a/docs/themeadapter-material.md +++ b/docs/themeadapter-material.md @@ -68,9 +68,9 @@ var (colors, typography, shapes) = createMdcTheme( // Then pass them through to MaterialTheme... MaterialTheme( - colors = colors, - typography = type, - shapes = shapes + colors = colors ?: MaterialTheme.colors, + typography = typography ?: MaterialTheme.typography, + shapes = shapes ?: MaterialTheme.shapes ) { // Rest of M2 layout } @@ -138,4 +138,4 @@ limitations under the License. [materialtheme]: https://developer.android.com/reference/kotlin/androidx/compose/material/MaterialTheme [colors]: https://developer.android.com/reference/kotlin/androidx/compose/material/Colors [typography]: https://developer.android.com/reference/kotlin/androidx/compose/material/Typography -[shapes]: https://developer.android.com/reference/kotlin/androidx/compose/material/Shapes \ No newline at end of file +[shapes]: https://developer.android.com/reference/kotlin/androidx/compose/material/Shapes