File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
composeApp/src/desktopTest/kotlin/com/developersbreach/kotlindictionarymultiplatform
design-system/src/commonMain/kotlin/com/developersbreach/designsystem/components Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,14 @@ class DesignSystemTest {
9494 )
9595 }
9696
97+ @Test
98+ fun `no direct usage of androidx compose card should be allowed except designSystem` () {
99+ checkNoDirectUsageExceptAllowed(
100+ componentName = " androidx.compose.material3.Card" ,
101+ excludePaths = arrayOf(" $DESIGN_SYSTEM_PATH /Card.kt" ),
102+ )
103+ }
104+
97105 companion object {
98106 private const val DESIGN_SYSTEM_PATH =
99107 " design-system/src/commonMain/kotlin/com/developersbreach/designsystem/components"
Original file line number Diff line number Diff line change 1+ package com.developersbreach.designsystem.components
2+
3+ import androidx.compose.foundation.layout.ColumnScope
4+ import androidx.compose.material3.Card
5+ import androidx.compose.material3.CardColors
6+ import androidx.compose.material3.CardElevation
7+ import androidx.compose.runtime.Composable
8+ import androidx.compose.ui.Modifier
9+
10+ @Composable
11+ fun KdCard (
12+ modifier : Modifier ,
13+ colors : CardColors ,
14+ elevation : CardElevation ,
15+ content : @Composable ColumnScope .() -> Unit ,
16+ ) {
17+ Card (
18+ modifier = modifier,
19+ content = content,
20+ elevation = elevation,
21+ colors = colors,
22+ )
23+ }
You can’t perform that action at this time.
0 commit comments