public object AlertDialogDefaults
Contains the default values used by AlertDialog
Functions
EdgeButton
@Composable
public fun EdgeButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
colors: ButtonColors = ButtonDefaults.buttonColors(),
content: @Composable RowScope.() -> Unit = ConfirmIcon,
)
Default composable for the edge button in an AlertDialog. This is a medium sized EdgeButton. Should be used with AlertDialog overload which contains a single edgeButton slot.
Parameters
| onClick | The callback to be invoked when the button is clicked. |
| modifier | The Modifier to be applied to the button. |
| colors | The ButtonColors to be used for the button. |
| content | The composable content of the button. Defaults to ConfirmIcon. |
ConfirmButton
@Composable
public fun ConfirmButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
colors: IconButtonColors = IconButtonDefaults.filledIconButtonColors(),
content: @Composable RowScope.() -> Unit = ConfirmIcon,
)
Default composable for the confirm button in an AlertDialog. Should be used with AlertDialog overload which has 2 button slots to confirm or dismiss the action.
Parameters
| onClick | The callback to be invoked when the button is clicked. |
| modifier | The Modifier to be applied to the button. |
| colors | The IconButtonColors to be used for the button. |
| content | The composable content of the button. Defaults to ConfirmIcon. |
DismissButton
@Composable
public fun DismissButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
colors: IconButtonColors = IconButtonDefaults.filledTonalIconButtonColors(),
content: @Composable RowScope.() -> Unit = DismissIcon,
)
Default composable for the dismiss button in an AlertDialog. Should be used with AlertDialog overload which has 2 button slots to confirm or dismiss the action.
Parameters
| onClick | The callback to be invoked when the button is clicked. |
| modifier | The Modifier to be applied to the button. |
| colors | The IconButtonColors to be used for the button. |
| content | The composable content of the button. Defaults to DismissIcon. |
confirmDismissContentPadding
@Composable
public fun confirmDismissContentPadding(): PaddingValues
The padding to apply around the content for the AlertDialog variation with confirm dismiss buttons and no icon content.
confirmDismissWithIconContentPadding
@Composable
public fun confirmDismissWithIconContentPadding(): PaddingValues
The padding to apply around the content for the AlertDialog variation when an icon is provided and with confirm dismiss buttons.
contentPadding
@Composable
public fun contentPadding(): PaddingValues
The padding to apply around the content for the AlertDialog with either a stack of buttons (no confirm or dismiss buttons) or an EdgeButton, and when there is no icon. For the EdgeButton variation, the bottom padding is ignored.
contentWithIconPadding
@Composable
public fun contentWithIconPadding(): PaddingValues
The padding to apply around the content for the AlertDialog with either a stack of buttons (no confirm or dismiss buttons) or an EdgeButton, and when there is an icon. For the EdgeButton variation, the bottom padding is ignored.
buttonStackContentPadding
@Composable
public fun buttonStackContentPadding(isScrollable: Boolean): PaddingValues
The padding to apply around the content for the AlertDialog variation using TransformingLazyColumn, without an icon, and with a stack of buttons for options. Bottom padding is calculated based on the provided isScrollable parameter, which favors the use of a bigger padding for scrollable content and a smaller one for fixed content.
buttonStackWithIconContentPadding
@Composable
public fun buttonStackWithIconContentPadding(isScrollable: Boolean): PaddingValues
The padding to apply around the content for the AlertDialog variation using TransformingLazyColumn, with icon, and with a stack of buttons for options. Bottom padding is calculated based on the provided isScrollable parameter, which favors the use of a bigger padding for scrollable content and a smaller one for fixed content.
GroupSeparator
@Composable
public fun GroupSeparator()
Separator for the AlertDialog. Should be used inside AlertDialog content for splitting groups of elements.