mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
RoundedIconAtom: add new size Big.
This commit is contained in:
committed by
Benoit Marty
parent
804506b91d
commit
7dc11a2226
+8
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user