Rename composable from example name

This commit is contained in:
imkunet 2024-09-20 04:48:32 -04:00
parent 6dbc9efa17
commit 2159eb37a0
No known key found for this signature in database
GPG Key ID: 32E0ECFB90A68C42

View File

@ -89,21 +89,21 @@ fun MangaNotesTextArea(
.padding(top = 4.dp), .padding(top = 4.dp),
) { ) {
item { item {
SlackDemoPanelButton( MangaNotesTextAreaButton(
onClick = { richTextState.toggleSpanStyle(SpanStyle(fontWeight = FontWeight.Bold)) }, onClick = { richTextState.toggleSpanStyle(SpanStyle(fontWeight = FontWeight.Bold)) },
isSelected = richTextState.currentSpanStyle.fontWeight == FontWeight.Bold, isSelected = richTextState.currentSpanStyle.fontWeight == FontWeight.Bold,
icon = Icons.Outlined.FormatBold, icon = Icons.Outlined.FormatBold,
) )
} }
item { item {
SlackDemoPanelButton( MangaNotesTextAreaButton(
onClick = { richTextState.toggleSpanStyle(SpanStyle(fontStyle = FontStyle.Italic)) }, onClick = { richTextState.toggleSpanStyle(SpanStyle(fontStyle = FontStyle.Italic)) },
isSelected = richTextState.currentSpanStyle.fontStyle == FontStyle.Italic, isSelected = richTextState.currentSpanStyle.fontStyle == FontStyle.Italic,
icon = Icons.Outlined.FormatItalic, icon = Icons.Outlined.FormatItalic,
) )
} }
item { item {
SlackDemoPanelButton( MangaNotesTextAreaButton(
onClick = { onClick = {
richTextState.toggleSpanStyle(SpanStyle(textDecoration = TextDecoration.Underline)) richTextState.toggleSpanStyle(SpanStyle(textDecoration = TextDecoration.Underline))
}, },
@ -119,14 +119,14 @@ fun MangaNotesTextArea(
) )
} }
item { item {
SlackDemoPanelButton( MangaNotesTextAreaButton(
onClick = { richTextState.toggleUnorderedList() }, onClick = { richTextState.toggleUnorderedList() },
isSelected = richTextState.isUnorderedList, isSelected = richTextState.isUnorderedList,
icon = Icons.AutoMirrored.Outlined.FormatListBulleted, icon = Icons.AutoMirrored.Outlined.FormatListBulleted,
) )
} }
item { item {
SlackDemoPanelButton( MangaNotesTextAreaButton(
onClick = { richTextState.toggleOrderedList() }, onClick = { richTextState.toggleOrderedList() },
isSelected = richTextState.isOrderedList, isSelected = richTextState.isOrderedList,
icon = Icons.Outlined.FormatListNumbered, icon = Icons.Outlined.FormatListNumbered,
@ -139,7 +139,7 @@ fun MangaNotesTextArea(
) )
} }
item { item {
SlackDemoPanelButton( MangaNotesTextAreaButton(
onClick = { richTextState.toggleSpanStyle(SpanStyle(fontSize = largeFontSize)) }, onClick = { richTextState.toggleSpanStyle(SpanStyle(fontSize = largeFontSize)) },
isSelected = richTextState.currentSpanStyle.fontSize == largeFontSize, isSelected = richTextState.currentSpanStyle.fontSize == largeFontSize,
icon = Icons.Outlined.FormatSize, icon = Icons.Outlined.FormatSize,
@ -162,7 +162,7 @@ fun MangaNotesTextArea(
} }
@Composable @Composable
fun SlackDemoPanelButton( fun MangaNotesTextAreaButton(
onClick: () -> Unit, onClick: () -> Unit,
icon: ImageVector, icon: ImageVector,
isSelected: Boolean, isSelected: Boolean,