Skip to content

Conversation

@DBFabianWenzel
Copy link
Contributor

No description provided.

Comment on lines 20 to 21
// The card components are shaded and rounded areas that give the interface depth.
// Whether static or interactive - the cards are the basis for further components and modules and can display content and actions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the comment lines to KDoc and add missing parameter with descriptions.

Comment on lines 29 to 39
val spacingValue = when (spacing) {
DSSpacing.SMALL -> DesignSystemTheme.dimensions.spacing.fixedSm
DSSpacing.MEDIUM -> DesignSystemTheme.dimensions.spacing.fixedMd
DSSpacing.LARGE -> DesignSystemTheme.dimensions.spacing.fixedLg
}

val elevationColor = when (elevation) {
DSCardElevation.LEVEL_1 -> DesignSystemTheme.activeColor.bgBasicLevel1Default
DSCardElevation.LEVEL_2 -> DesignSystemTheme.activeColor.bgBasicLevel2Default
DSCardElevation.LEVEL_3 -> DesignSystemTheme.activeColor.bgBasicLevel3Default
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add these values to the respective enum as attributes.

}
}

enum class DSSpacing { SMALL, MEDIUM, LARGE }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to DSCardSpacing?

.padding(spacingValue)
.then(modifier)
) {
Column(modifier = Modifier, content = content)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use Modifier.fillMaxSize()? Or even better: Use the content parameter directly for the surfaces' content attribute.


@Composable
@Preview()
fun DSCardPreview() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add DSCardElevation and DSCardSpacing PreviewParameters and use them for the preview. Maybe we could also add a PreviewParameter with some colors to preview adaptive colors.

@tkoecher tkoecher merged commit fbd6fd4 into develop Nov 19, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants