Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 662 Bytes

dialog-color.md

File metadata and controls

9 lines (6 loc) · 662 Bytes

Color Dialog

Preview Module
Preview Preview color

This shows a color selector dialog. A table with predefined material colors as well as a customisation page will be shown. Alpha support can be enabled optionally.

fun DialogColor(
// Base Dialog - State
state: DialogState,
// Custom - Required
color: MutableState<Color>,
// Custom - Optional
texts: DialogColor.Texts = DialogColorDefaults.texts(),
alphaSupported: Boolean = true,
shape: Shape = MaterialTheme.shapes.small,
gridSize: Int = if (isLandscape()) 6 else 4,
labelStyle: DialogColor.LabelStyle = DialogColor.LabelStyle.Value,
// Base Dialog - Optional
title: String? = null,
icon: (@Composable () -> Unit)? = null,
style: ComposeDialogStyle = DialogDefaults.defaultDialogStyle(),
buttons: DialogButtons = DialogDefaults.buttons(),
options: Options = Options(),
specialOptions: SpecialOptions = DialogDefaults.defaultColorDialogSpecialOptions(),
onEvent: (event: DialogEvent) -> Unit = {}
) {