# MainAction.Custom


```
@Immutable
class MainAction.Custom : MainAction
```

<br />

*** ** * ** ***

Fully custom main action button.

Note: When instantiating inside a Composable, memoize `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#onClick()` and `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#icon()` using `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/androidx/compose/runtime/package-summary#remember(kotlin.Function0)` to avoid unnecessary recompositions.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#Custom(kotlin.String,androidx.compose.ui.graphics.painter.Painter,kotlin.String,kotlin.Function0,com.google.android.libraries.places.compose.action.MainAction.Style)( text: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, icon: https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/androidx/compose/ui/graphics/painter/Painter?, contentDescription: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?, onClick: () -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html, style: https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Style )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#contentDescription()` |
| `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/androidx/compose/ui/graphics/painter/Painter?` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#icon()` Optional custom icon to display. |
| `() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#onClick()` Callback invoked when the button is clicked. |
| `open https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Style` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#style()` The visual style of the button. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#text()` Optional label to display on the button. |

## Public constructors

### Custom

```
Custom(
    text: String,
    icon: Painter? = null,
    contentDescription: String? = null,
    onClick: () -> Unit,
    style: MainAction.Style = Style.SECONDARY
)
```

## Public properties

### contentDescription

```
val contentDescription: String?
```

### icon

```
val icon: Painter?
```

Optional custom icon to display. At least one of `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#text()` or `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#icon()` must be provided.

### onClick

```
val onClick: () -> Unit
```

Callback invoked when the button is clicked.

### style

```
open val style: MainAction.Style
```

The visual style of the button. Defaults to `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Style#SECONDARY`.

### text

```
val text: String
```

Optional label to display on the button. At least one of `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#text()` or `https://developers.google.com/maps/documentation/places/android-sdk/reference/kotlin/com/google/android/libraries/places/compose/action/MainAction.Custom#icon()` must be provided.