Skip to content

Commit

Permalink
Update dialog-color.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MFlisar authored Oct 24, 2024
1 parent 9e1739d commit bb3a19d
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions readmes/dialog-color.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,4 @@

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.

```kotlin
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 = {}
)
```
https://github.com/MFlisar/ComposeDialogs/blob/9e1739ddcf138f5774daf55c99c3f20af351be7b/library/modules/color/src/commonMain/kotlin/com/michaelflisar/composedialogs/dialogs/color/DialogColor.kt#L62-L81

0 comments on commit bb3a19d

Please sign in to comment.