|
|
|
@ -17,7 +17,6 @@
|
|
|
|
|
package com.google.samples.apps.niacatalog.ui
|
|
|
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.Arrangement
|
|
|
|
|
import androidx.compose.foundation.layout.Row
|
|
|
|
|
import androidx.compose.foundation.layout.WindowInsets
|
|
|
|
|
import androidx.compose.foundation.layout.add
|
|
|
|
|
import androidx.compose.foundation.layout.asPaddingValues
|
|
|
|
@ -77,7 +76,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Buttons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(onClick = {}) {
|
|
|
|
|
Text(text = "Enabled")
|
|
|
|
|
}
|
|
|
|
@ -91,7 +90,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Disabled buttons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
enabled = false
|
|
|
|
@ -114,7 +113,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Buttons with leading icons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
text = { Text(text = "Enabled") },
|
|
|
|
@ -140,7 +139,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Disabled buttons with leading icons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
enabled = false,
|
|
|
|
@ -195,7 +194,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Disabled buttons with trailing icons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
enabled = false,
|
|
|
|
@ -224,7 +223,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Small buttons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
small = true
|
|
|
|
@ -247,7 +246,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Disabled small buttons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
enabled = false,
|
|
|
|
@ -307,7 +306,7 @@ fun NiaCatalog() {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
enabled = false,
|
|
|
|
@ -339,7 +338,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Small buttons with trailing icons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
small = true,
|
|
|
|
@ -373,7 +372,7 @@ fun NiaCatalog() {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
NiaFilledButton(
|
|
|
|
|
onClick = {},
|
|
|
|
|
enabled = false,
|
|
|
|
@ -414,7 +413,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Chips", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
var firstChecked by remember { mutableStateOf(false) }
|
|
|
|
|
NiaFilterChip(
|
|
|
|
|
checked = firstChecked,
|
|
|
|
@ -438,7 +437,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Toggle buttons", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
var firstChecked by remember { mutableStateOf(false) }
|
|
|
|
|
NiaToggleButton(
|
|
|
|
|
checked = firstChecked,
|
|
|
|
@ -499,7 +498,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("View toggle", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
var firstExpanded by remember { mutableStateOf(false) }
|
|
|
|
|
NiaViewToggleButton(
|
|
|
|
|
expanded = firstExpanded,
|
|
|
|
@ -518,7 +517,7 @@ fun NiaCatalog() {
|
|
|
|
|
}
|
|
|
|
|
item { Text("Tags", Modifier.padding(top = 16.dp)) }
|
|
|
|
|
item {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
FlowRow(mainAxisSpacing = 16.dp) {
|
|
|
|
|
var firstFollowed by remember { mutableStateOf(false) }
|
|
|
|
|
NiaTopicTag(
|
|
|
|
|
followed = firstFollowed,
|
|
|
|
|