Skip to content

Commit

Permalink
docs: Add destructuring example to useThemeUI API
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanjc committed Nov 9, 2022
1 parent 5cba456 commit ac6d70d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/docs/src/pages/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,9 @@ The `useThemeUI` hook returns the full Theme UI context object, which includes

```js
const context = useThemeUI()
const { theme, components, colorMode, setColorMode } = context
```

### `Context`

The React context used in Theme UI.

### `useColorMode`

The `useColorMode` hook returns an array with two values: the current color mode
Expand Down Expand Up @@ -120,6 +117,10 @@ override custom & component styling.
</BaseStyles>
```

### `Context`

The React context used in Theme UI.

### `css`

As an alternative to using the `sx` prop, the `css` utility is intended for use
Expand Down

0 comments on commit ac6d70d

Please sign in to comment.