Skip to content

Commit

Permalink
feat: ClearIconButton tint 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
jinukeu committed Jan 24, 2024
1 parent ee16e68 commit 3b4c1fe
Showing 1 changed file with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.susu.core.designsystem.component.button

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Icon
Expand All @@ -8,8 +10,11 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.susu.core.designsystem.R
import com.susu.core.designsystem.theme.Gray10
import com.susu.core.designsystem.theme.Gray30
import com.susu.core.ui.extension.susuClickable

Expand All @@ -22,10 +27,22 @@ fun ClearIconButton(
Icon(
modifier = Modifier
.clip(CircleShape)
.background(tint)
.size(iconSize)
.susuClickable(onClick = onClick),
painter = painterResource(id = R.drawable.ic_clear),
painter = painterResource(id = com.susu.core.ui.R.drawable.ic_close),
contentDescription = "",
tint = tint,
tint = Gray10,
)
}

@Preview
@Composable
fun ClearIconButtonPreview() {
Column {
ClearIconButton(
iconSize = 24.dp,
onClick = {},
)
}
}

0 comments on commit 3b4c1fe

Please sign in to comment.