```ts
function withColorScheme<P>(Component, colorScheme): (props) => Element;
```

## Type Parameters

| Type Parameter |
| ------ |
| `P extends object` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `Component` | `ComponentType<P>` |
| `colorScheme` | `"dark" \| "light"` |

## Returns

```ts
(props): Element;
```

### Parameters

| Parameter | Type |
| ------ | ------ |
| `props` | `P` |

### Returns

`Element`
