[Compound] Implement components (Button) (#1021)
* Create `CompoundButton` * Some fixes * Lint fixes * Start replacing existing `Button` usages * Replace button usages * Remove previous Button composable * Rename `CompoundButton` to `Button` * Fix emphasized button being displayed as Text * Fix cancel button in `WaitListView` * Update screenshots * Add shorthand functions for `OutlinedButton` and `TextButton` * Add changelog * Fix wrong size used for emphasized button in dialog * Create a private `ButtonInternal` implementation with the shared logic. - Make `ButtonStyle` private. - Rename `title` to `text`. - Rename `buttonStyle` and `buttonSize` to just `style` and `size`. * Fix several warnings and lint issues. * Update screenshots --------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
parent
fdee5d8a76
commit
23982dde47
228 changed files with 805 additions and 950 deletions
|
|
@ -68,7 +68,6 @@ import io.element.android.libraries.designsystem.components.button.BackButton
|
|||
import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||
import io.element.android.libraries.designsystem.theme.aliasButtonText
|
||||
import io.element.android.libraries.designsystem.theme.aliasScreenTitle
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.Scaffold
|
||||
|
|
@ -115,17 +114,13 @@ fun RoomDetailsEditView(
|
|||
navigationIcon = { BackButton(onClick = onBackPressed) },
|
||||
actions = {
|
||||
TextButton(
|
||||
text = stringResource(CommonStrings.action_save),
|
||||
enabled = state.saveButtonEnabled,
|
||||
onClick = {
|
||||
focusManager.clearFocus()
|
||||
state.eventSink(RoomDetailsEditEvents.Save)
|
||||
},
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(CommonStrings.action_save),
|
||||
style = ElementTheme.typography.aliasButtonText,
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -128,10 +128,8 @@ fun RoomInviteMembersTopBar(
|
|||
navigationIcon = { BackButton(onClick = onBackPressed) },
|
||||
actions = {
|
||||
TextButton(
|
||||
text = stringResource(CommonStrings.action_send),
|
||||
onClick = onSendPressed,
|
||||
content = {
|
||||
Text(stringResource(CommonStrings.action_send))
|
||||
},
|
||||
enabled = canSend,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
|||
import io.element.android.libraries.designsystem.components.button.BackButton
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||
import io.element.android.libraries.designsystem.theme.aliasButtonText
|
||||
import io.element.android.libraries.designsystem.theme.aliasScreenTitle
|
||||
import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator
|
||||
import io.element.android.libraries.designsystem.theme.components.Scaffold
|
||||
|
|
@ -212,14 +211,9 @@ private fun RoomMemberListTopBar(
|
|||
actions = {
|
||||
if (canInvite) {
|
||||
TextButton(
|
||||
modifier = Modifier.padding(horizontal = 8.dp),
|
||||
text = stringResource(CommonStrings.action_invite),
|
||||
onClick = onInvitePressed,
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(CommonStrings.action_invite),
|
||||
style = ElementTheme.typography.aliasButtonText,
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue