# ConnectMachineProps

<!-- https://uncage.vercel.app/docs/api/react-ui/interfaces/connectmachineprops/ -->

Defined in: react-ui/src/components/ConnectMachine.tsx:12

## Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="property-classname"></a> `className?` | `string` | - | react-ui/src/components/ConnectMachine.tsx:25 |
| <a id="property-variant"></a> `variant?` | `"dialog"` \| `"inline"` | `'dialog'` (default): a modal with Cancel (Esc and a backdrop click also close it). `'inline'`: embedded in the page, e.g. the chat's empty state; no Cancel. | react-ui/src/components/ConnectMachine.tsx:17 |

## Methods

### onClose()?

```ts
onClose?(): void;
```

Defined in: react-ui/src/components/ConnectMachine.tsx:19

Dialog: Cancel / Done, Esc or a backdrop click.

#### Returns

`void`

***

### onConnected()?

```ts
onConnected?(machine): void;
```

Defined in: react-ui/src/components/ConnectMachine.tsx:24

A computer came online while this was shown (a new one, or a known one reconnecting). It is
selected for new sessions before this is called.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `machine` | \{ `agentOutdated`: `boolean`; `agentVersion`: `string`; `id`: `string`; `lastSeenAt`: `string`; `name`: `string`; `online`: `boolean`; `os`: `string`; `runtimes`: `object`[]; `transport`: `"ws"` \| `"http"` \| `null`; \} |
| `machine.agentOutdated` | `boolean` |
| `machine.agentVersion` | `string` |
| `machine.id` | `string` |
| `machine.lastSeenAt` | `string` |
| `machine.name` | `string` |
| `machine.online` | `boolean` |
| `machine.os` | `string` |
| `machine.runtimes` | `object`[] |
| `machine.transport` | `"ws"` \| `"http"` \| `null` |

#### Returns

`void`
