🚀 Add Vertical Divider to Switch
* Added Vertical Divider to Switch (if no description)
This commit is contained in:
parent
628f10f4e7
commit
c107695c1e
1 changed files with 10 additions and 1 deletions
|
|
@ -5,12 +5,14 @@ import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.Switch
|
import androidx.compose.material3.Switch
|
||||||
import androidx.compose.material3.SwitchDefaults
|
import androidx.compose.material3.SwitchDefaults
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.material3.VerticalDivider
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -60,7 +62,14 @@ fun SwitchWithTitle(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
if (description.isNullOrBlank()) {
|
||||||
|
Spacer(modifier = Modifier.width(18.dp))
|
||||||
|
VerticalDivider(
|
||||||
|
modifier = Modifier.height(34.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(modifier = Modifier.width(18.dp))
|
||||||
Switch(
|
Switch(
|
||||||
checked = selected,
|
checked = selected,
|
||||||
onCheckedChange = null,
|
onCheckedChange = null,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue