RoundedIconAtom: add new size Big.
This commit is contained in:
parent
801307f1e2
commit
6be3da1772
1 changed files with 8 additions and 0 deletions
|
|
@ -71,6 +71,7 @@ fun RoundedIconAtom(
|
||||||
private fun RoundedIconAtomSize.toContainerSize(): Dp {
|
private fun RoundedIconAtomSize.toContainerSize(): Dp {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
RoundedIconAtomSize.Medium -> 30.dp
|
RoundedIconAtomSize.Medium -> 30.dp
|
||||||
|
RoundedIconAtomSize.Big -> 36.dp
|
||||||
RoundedIconAtomSize.Large -> 70.dp
|
RoundedIconAtomSize.Large -> 70.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -78,6 +79,7 @@ private fun RoundedIconAtomSize.toContainerSize(): Dp {
|
||||||
private fun RoundedIconAtomSize.toCornerSize(): Dp {
|
private fun RoundedIconAtomSize.toCornerSize(): Dp {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
RoundedIconAtomSize.Medium -> 8.dp
|
RoundedIconAtomSize.Medium -> 8.dp
|
||||||
|
RoundedIconAtomSize.Big -> 8.dp
|
||||||
RoundedIconAtomSize.Large -> 14.dp
|
RoundedIconAtomSize.Large -> 14.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -85,6 +87,7 @@ private fun RoundedIconAtomSize.toCornerSize(): Dp {
|
||||||
private fun RoundedIconAtomSize.toIconSize(): Dp {
|
private fun RoundedIconAtomSize.toIconSize(): Dp {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
RoundedIconAtomSize.Medium -> 16.dp
|
RoundedIconAtomSize.Medium -> 16.dp
|
||||||
|
RoundedIconAtomSize.Big -> 24.dp
|
||||||
RoundedIconAtomSize.Large -> 48.dp
|
RoundedIconAtomSize.Large -> 48.dp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -97,6 +100,10 @@ internal fun RoundedIconAtomPreview() = ElementPreview {
|
||||||
size = RoundedIconAtomSize.Medium,
|
size = RoundedIconAtomSize.Medium,
|
||||||
imageVector = Icons.Filled.Home,
|
imageVector = Icons.Filled.Home,
|
||||||
)
|
)
|
||||||
|
RoundedIconAtom(
|
||||||
|
size = RoundedIconAtomSize.Big,
|
||||||
|
imageVector = Icons.Filled.Home,
|
||||||
|
)
|
||||||
RoundedIconAtom(
|
RoundedIconAtom(
|
||||||
size = RoundedIconAtomSize.Large,
|
size = RoundedIconAtomSize.Large,
|
||||||
imageVector = Icons.Filled.Home,
|
imageVector = Icons.Filled.Home,
|
||||||
|
|
@ -106,5 +113,6 @@ internal fun RoundedIconAtomPreview() = ElementPreview {
|
||||||
|
|
||||||
enum class RoundedIconAtomSize {
|
enum class RoundedIconAtomSize {
|
||||||
Medium,
|
Medium,
|
||||||
|
Big,
|
||||||
Large
|
Large
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue