Question. Why i have that white background on the...
# compose-desktop
a
Question. Why i have that white background on the text?
Copy code
Column(
    modifier = Modifier.padding(16.dp),
) {
    Surface(
        elevation = 4.dp,
        modifier = Modifier.clip(MaterialTheme.shapes.medium)
            .background(color = MaterialTheme.colors.primary)
            .clickable {}
            .padding(8.dp)
    ) {
        Text(text = "${repo.owner.login}/${repo.name}")
    }
}
i
For Surface we should pass color/shape with parameters:
Copy code
Column(
        modifier = Modifier.padding(16.dp),
) {
    Surface(
            elevation = 4.dp,
            shape = MaterialTheme.shapes.medium,
            color = MaterialTheme.colors.primary
    ) {
        Box(Modifier.clickable {}.padding(8.dp)) {
            Text(text = "${repo.owner.login}/${repo.name}")
        }
    }
}
White background was because inside Surface we override background color with color passed with parameter