mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Add dividers to node details (#3466)
This commit is contained in:
parent
d64825f4f4
commit
73b37c17dc
9 changed files with 122 additions and 6 deletions
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) 2025 Meshtastic LLC
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.meshtastic.core.ui.component
|
||||
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material3.DividerDefaults
|
||||
import androidx.compose.material3.HorizontalDivider
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
@Composable
|
||||
fun InsetDivider(
|
||||
modifier: Modifier = Modifier,
|
||||
inset: Dp = 16.dp,
|
||||
thickness: Dp = DividerDefaults.Thickness,
|
||||
color: Color = DividerDefaults.color,
|
||||
) {
|
||||
InsetDivider(modifier = modifier, startInset = inset, endInset = inset, thickness = thickness, color = color)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun InsetDivider(
|
||||
modifier: Modifier = Modifier,
|
||||
startInset: Dp = 0.dp,
|
||||
endInset: Dp = 0.dp,
|
||||
thickness: Dp = DividerDefaults.Thickness,
|
||||
color: Color = DividerDefaults.color,
|
||||
) {
|
||||
HorizontalDivider(
|
||||
modifier = modifier.padding(start = startInset, end = endInset),
|
||||
thickness = thickness,
|
||||
color = color,
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue