mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
migrate object to data object (#1135)
This commit is contained in:
+2
-2
@@ -105,7 +105,7 @@ sealed class ElementLogoAtomSize(
|
||||
val shadowColorLight: Color,
|
||||
val shadowRadius: Dp,
|
||||
) {
|
||||
object Medium : ElementLogoAtomSize(
|
||||
data object Medium : ElementLogoAtomSize(
|
||||
outerSize = 120.dp,
|
||||
logoSize = 83.5.dp,
|
||||
cornerRadius = 33.dp,
|
||||
@@ -115,7 +115,7 @@ sealed class ElementLogoAtomSize(
|
||||
shadowRadius = 32.dp,
|
||||
)
|
||||
|
||||
object Large : ElementLogoAtomSize(
|
||||
data object Large : ElementLogoAtomSize(
|
||||
outerSize = 158.dp,
|
||||
logoSize = 110.dp,
|
||||
cornerRadius = 44.dp,
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ fun ProgressDialog(
|
||||
@Immutable
|
||||
sealed interface ProgressDialogType {
|
||||
data class Determinate(val progress: Float) : ProgressDialogType
|
||||
object Indeterminate : ProgressDialogType
|
||||
data object Indeterminate : ProgressDialogType
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
+3
-3
@@ -140,9 +140,9 @@ fun ListItem(
|
||||
* The style to use for a [ListItem].
|
||||
*/
|
||||
sealed interface ListItemStyle {
|
||||
object Default : ListItemStyle
|
||||
object Primary: ListItemStyle
|
||||
object Destructive : ListItemStyle
|
||||
data object Default : ListItemStyle
|
||||
data object Primary: ListItemStyle
|
||||
data object Destructive : ListItemStyle
|
||||
}
|
||||
|
||||
// region: Simple list item
|
||||
|
||||
+4
-4
@@ -120,13 +120,13 @@ object ListSupportingTextDefaults {
|
||||
/** Specifies the padding to use for the supporting text. */
|
||||
sealed interface Padding {
|
||||
/** No padding. */
|
||||
object None : Padding
|
||||
data object None : Padding
|
||||
/** Default padding, it will align fine with a [ListItem] with no leading content. */
|
||||
object Default : Padding
|
||||
data object Default : Padding
|
||||
/** It will align to a [ListItem] with an [Icon] or [Checkbox] as leading content. */
|
||||
object SmallLeadingContent : Padding
|
||||
data object SmallLeadingContent : Padding
|
||||
/** It will align to with a [ListItem] with a [Switch] as leading content. */
|
||||
object LargeLeadingContent : Padding
|
||||
data object LargeLeadingContent : Padding
|
||||
/** It will align to with a [ListItem] with a custom start [padding]. */
|
||||
data class Custom(val padding: Dp) : Padding
|
||||
|
||||
|
||||
Reference in New Issue
Block a user