Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.paw.key.core.designsystem.component

import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.paw.key.core.designsystem.theme.PawKeyTheme

@Composable
fun DogkyFilterBadge(
location: String,
onLocationClick: () -> Unit,
modifier: Modifier = Modifier,
horizontalPadding: Int = 10,
verticalPadding: Int = 9,
) {
Box(
modifier = modifier
.clip(
RoundedCornerShape(4.dp)
)
.background(
color = PawKeyTheme.colors.opacity5Primary,
shape = RoundedCornerShape(4.dp)
)
.border(
width = 1.dp,
color = PawKeyTheme.colors.primary,
shape = RoundedCornerShape(4.dp)
)
.clickable(
onClick = onLocationClick
),
contentAlignment = Alignment.Center
) {
Text(
text = location,
style = PawKeyTheme.typography.buttonSmall,
color = PawKeyTheme.colors.primary,
modifier = Modifier.padding(horizontal = horizontalPadding.dp, vertical = verticalPadding.dp)
)
}
}

@Preview
@Composable
private fun RegionBadgePreview() {
PawKeyTheme {
DogkyFilterBadge(
location = "w적음",
onLocationClick = {}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.paw.key.core.designsystem.theme.PawKeyTheme
Expand Down Expand Up @@ -41,4 +40,4 @@ private fun LoadingScreenPreview() {
PawKeyTheme {
LoadingScreen()
}
}
}
4 changes: 2 additions & 2 deletions app/src/main/java/com/paw/key/core/designsystem/theme/Type.kt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class PawKeyTypography internal constructor(
buttonSmall: TextStyle = this.buttonSmall,
buttonLink: TextStyle = this.buttonLink,

): PawKeyTypography = PawKeyTypography(
): PawKeyTypography = PawKeyTypography(
head24B,
head24Sb,
head22B,
Expand Down Expand Up @@ -454,4 +454,4 @@ fun pawKeyTypography(): PawKeyTypography {
letterSpacing = 0.em
),
)
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
package com.paw.key.presentation.ui.home

import androidx.compose.foundation.layout.Box
Expand Down Expand Up @@ -169,4 +170,4 @@ fun HomeLocationSettingScreen(

Spacer(modifier = Modifier.height(46.dp))
}
}
}*/
Loading