# StatusMessageProps

Props for [`StatusMessage`](https://docs.mapcairn.com/api/map/StatusMessage.md).

This is an interface exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import type { StatusMessageProps } from "@mapcairn/map";
 
interface StatusMessageProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onBlur" | "onFocus" | "onMouseEnter" | "onMouseLeave" | "role">
```

## Properties

### action

```ts
readonly action?: {
        readonly label: string;
        readonly onClick: () => void;
    };
```

An optional action, such as "Retry". It does not dismiss the message.

### autoDismissMs

```ts
readonly autoDismissMs?: number;
```

How long an `info` or `success` message stays before `onDismiss` is
called. Values under 6000 are raised to 6000. Ignored for errors.
Changing it after mount has no effect; remount with a `key` instead.

### children

```ts
readonly children: ReactNode;
```

The message text. Keep it short and specific.

### dismissLabel

```ts
readonly dismissLabel?: string;
```

The accessible name of the dismiss button. Defaults to the catalogue's "ui.dismiss".

### onDismiss

```ts
readonly onDismiss: () => void;
```

Called when the person dismisses the message, and when it times out.

### variant

```ts
readonly variant: StatusMessageVariant;
```

`info` and `success` are polite status messages; `error` is an alert.

## See also

- [`StatusMessageVariant`](https://docs.mapcairn.com/api/map/StatusMessageVariant.md)

Source: [packages/map/src/ui/StatusMessage/StatusMessage.tsx:40](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/ui/StatusMessage/StatusMessage.tsx#L40)
