@ -66,7 +66,7 @@ fun NiaCatalog() {
LazyColumn (
modifier = Modifier . fillMaxSize ( ) ,
contentPadding = contentPadding ,
verticalArrangement = Arrangement . spacedBy ( 16. dp )
verticalArrangement = Arrangement . spacedBy ( 16. dp ) ,
) {
item {
Text (
@ -93,19 +93,19 @@ fun NiaCatalog() {
FlowRow ( mainAxisSpacing = 16. dp ) {
NiaButton (
onClick = { } ,
enabled = false
enabled = false ,
) {
Text ( text = " Disabled " )
}
NiaOutlinedButton (
onClick = { } ,
enabled = false
enabled = false ,
) {
Text ( text = " Disabled " )
}
NiaTextButton (
onClick = { } ,
enabled = false
enabled = false ,
) {
Text ( text = " Disabled " )
}
@ -119,21 +119,21 @@ fun NiaCatalog() {
text = { Text ( text = " Enabled " ) } ,
leadingIcon = {
Icon ( imageVector = NiaIcons . Add , contentDescription = null )
}
} ,
)
NiaOutlinedButton (
onClick = { } ,
text = { Text ( text = " Enabled " ) } ,
leadingIcon = {
Icon ( imageVector = NiaIcons . Add , contentDescription = null )
}
} ,
)
NiaTextButton (
onClick = { } ,
text = { Text ( text = " Enabled " ) } ,
leadingIcon = {
Icon ( imageVector = NiaIcons . Add , contentDescription = null )
}
} ,
)
}
}
@ -146,7 +146,7 @@ fun NiaCatalog() {
text = { Text ( text = " Disabled " ) } ,
leadingIcon = {
Icon ( imageVector = NiaIcons . Add , contentDescription = null )
}
} ,
)
NiaOutlinedButton (
onClick = { } ,
@ -154,7 +154,7 @@ fun NiaCatalog() {
text = { Text ( text = " Disabled " ) } ,
leadingIcon = {
Icon ( imageVector = NiaIcons . Add , contentDescription = null )
}
} ,
)
NiaTextButton (
onClick = { } ,
@ -162,7 +162,7 @@ fun NiaCatalog() {
text = { Text ( text = " Disabled " ) } ,
leadingIcon = {
Icon ( imageVector = NiaIcons . Add , contentDescription = null )
}
} ,
)
}
}
@ -173,14 +173,14 @@ fun NiaCatalog() {
text = { Text ( " Enabled " ) } ,
items = listOf ( " Item 1 " , " Item 2 " , " Item 3 " ) ,
onItemClick = { } ,
itemText = { item -> Text ( item ) }
itemText = { item -> Text ( item ) } ,
)
NiaDropdownMenuButton (
text = { Text ( " Disabled " ) } ,
items = listOf ( " Item 1 " , " Item 2 " , " Item 3 " ) ,
onItemClick = { } ,
itemText = { item -> Text ( item ) } ,
enabled = false
enabled = false ,
)
}
}
@ -191,25 +191,25 @@ fun NiaCatalog() {
NiaFilterChip (
selected = firstChecked ,
onSelectedChange = { checked -> firstChecked = checked } ,
label = { Text ( text = " Enabled " ) }
label = { Text ( text = " Enabled " ) } ,
)
var secondChecked by remember { mutableStateOf ( true ) }
NiaFilterChip (
selected = secondChecked ,
onSelectedChange = { checked -> secondChecked = checked } ,
label = { Text ( text = " Enabled " ) }
label = { Text ( text = " Enabled " ) } ,
)
NiaFilterChip (
selected = false ,
onSelectedChange = { } ,
enabled = false ,
label = { Text ( text = " Disabled " ) }
label = { Text ( text = " Disabled " ) } ,
)
NiaFilterChip (
selected = true ,
onSelectedChange = { } ,
enabled = false ,
label = { Text ( text = " Disabled " ) }
label = { Text ( text = " Disabled " ) } ,
)
}
}
@ -223,15 +223,15 @@ fun NiaCatalog() {
icon = {
Icon (
painter = painterResource ( id = NiaIcons . BookmarkBorder ) ,
contentDescription = null
contentDescription = null ,
)
} ,
checkedIcon = {
Icon (
painter = painterResource ( id = NiaIcons . Bookmark ) ,
contentDescription = null
contentDescription = null ,
)
}
} ,
)
var secondChecked by remember { mutableStateOf ( true ) }
NiaIconToggleButton (
@ -240,15 +240,15 @@ fun NiaCatalog() {
icon = {
Icon (
painter = painterResource ( id = NiaIcons . BookmarkBorder ) ,
contentDescription = null
contentDescription = null ,
)
} ,
checkedIcon = {
Icon (
painter = painterResource ( id = NiaIcons . Bookmark ) ,
contentDescription = null
contentDescription = null ,
)
}
} ,
)
NiaIconToggleButton (
checked = false ,
@ -256,16 +256,16 @@ fun NiaCatalog() {
icon = {
Icon (
painter = painterResource ( id = NiaIcons . BookmarkBorder ) ,
contentDescription = null
contentDescription = null ,
)
} ,
checkedIcon = {
Icon (
painter = painterResource ( id = NiaIcons . Bookmark ) ,
contentDescription = null
contentDescription = null ,
)
} ,
enabled = false
enabled = false ,
)
NiaIconToggleButton (
checked = true ,
@ -273,16 +273,16 @@ fun NiaCatalog() {
icon = {
Icon (
painter = painterResource ( id = NiaIcons . BookmarkBorder ) ,
contentDescription = null
contentDescription = null ,
)
} ,
checkedIcon = {
Icon (
painter = painterResource ( id = NiaIcons . Bookmark ) ,
contentDescription = null
contentDescription = null ,
)
} ,
enabled = false
enabled = false ,
)
}
}
@ -294,21 +294,21 @@ fun NiaCatalog() {
expanded = firstExpanded ,
onExpandedChange = { expanded -> firstExpanded = expanded } ,
compactText = { Text ( text = " Compact view " ) } ,
expandedText = { Text ( text = " Expanded view " ) }
expandedText = { Text ( text = " Expanded view " ) } ,
)
var secondExpanded by remember { mutableStateOf ( true ) }
NiaViewToggleButton (
expanded = secondExpanded ,
onExpandedChange = { expanded -> secondExpanded = expanded } ,
compactText = { Text ( text = " Compact view " ) } ,
expandedText = { Text ( text = " Expanded view " ) }
expandedText = { Text ( text = " Expanded view " ) } ,
)
NiaViewToggleButton (
expanded = false ,
onExpandedChange = { } ,
compactText = { Text ( text = " Disabled " ) } ,
expandedText = { Text ( text = " Disabled " ) } ,
enabled = false
enabled = false ,
)
}
}
@ -330,7 +330,7 @@ fun NiaCatalog() {
text = { Text ( text = " Topic 1 " . uppercase ( ) ) } ,
followText = { Text ( text = " Follow " ) } ,
unFollowText = { Text ( text = " Unfollow " ) } ,
browseText = { Text ( text = " Browse topic " ) }
browseText = { Text ( text = " Browse topic " ) } ,
)
var secondFollowed by remember { mutableStateOf ( true ) }
NiaTopicTag (
@ -345,7 +345,7 @@ fun NiaCatalog() {
text = { Text ( text = " Topic 2 " . uppercase ( ) ) } ,
followText = { Text ( text = " Follow " ) } ,
unFollowText = { Text ( text = " Unfollow " ) } ,
browseText = { Text ( text = " Browse topic " ) }
browseText = { Text ( text = " Browse topic " ) } ,
)
NiaTopicTag (
expanded = false ,
@ -355,7 +355,7 @@ fun NiaCatalog() {
onUnfollowClick = { } ,
onBrowseClick = { } ,
text = { Text ( text = " Disabled " . uppercase ( ) ) } ,
enabled = false
enabled = false ,
)
}
}
@ -368,7 +368,7 @@ fun NiaCatalog() {
NiaTab (
selected = selectedTabIndex == index ,
onClick = { selectedTabIndex = index } ,
text = { Text ( text = title ) }
text = { Text ( text = title ) } ,
)
}
}
@ -380,12 +380,12 @@ fun NiaCatalog() {
val icons = listOf (
NiaIcons . UpcomingBorder ,
NiaIcons . MenuBookBorder ,
NiaIcons . BookmarksBorder
NiaIcons . BookmarksBorder ,
)
val selectedIcons = listOf (
NiaIcons . Upcoming ,
NiaIcons . MenuBook ,
NiaIcons . Bookmarks
NiaIcons . Bookmarks ,
)
val tagIcon = NiaIcons . Tag
NiaNavigationBar {
@ -397,7 +397,7 @@ fun NiaCatalog() {
} else {
Icon (
painter = painterResource ( id = icons [ index ] ) ,
contentDescription = item
contentDescription = item ,
)
}
} ,
@ -407,13 +407,13 @@ fun NiaCatalog() {
} else {
Icon (
painter = painterResource ( id = selectedIcons [ index ] ) ,
contentDescription = item
contentDescription = item ,
)
}
} ,
label = { Text ( item ) } ,
selected = selectedItem == index ,
onClick = { selectedItem = index }
onClick = { selectedItem = index } ,
)
}
}