Add dividers to node details (#3466)

This commit is contained in:
Phil Oliver 2025-10-14 22:06:45 -04:00 committed by GitHub
parent d64825f4f4
commit 73b37c17dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 122 additions and 6 deletions

View file

@ -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,
)
}