Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit 39b3208

Browse files
committed
docs: update components-api
1 parent 09f3ad0 commit 39b3208

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

src/docs/documentation/references/components-api.mdx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ menu: References
99

1010
> ### Note
1111
>
12-
> By default, this components and hooks just works inside a Docz theme, because it needs a lot of data that just has in a Docz environment
12+
> By default, these components and hooks only work inside a Docz theme, because they rely on a lot of data fetched by docz at build-time.
1313
1414
---
1515

1616
## `<ComponentsProvider>`
1717

18-
Use this provider to pass your components to MDX use them inside it as a HTML tags.
18+
Use this provider to pass your components to MDX and they will be used when converting your markdown to html.
1919

2020
```js
2121
import React from 'react'
@@ -81,7 +81,7 @@ export const ComponentsProvider: React.SFC<ComponentsProviderProps>
8181
8282
## `<Playground>`
8383
84-
Used to render your component inside a playground and showing the code used for that.
84+
Used to render your component inside a playground and show an editable version of your code inside it.
8585
8686
### Properties
8787
@@ -91,7 +91,7 @@ Used to render your component inside a playground and showing the code used for
9191
9292
```ts
9393
interface PlaygroundProps {
94-
children: React.ReactNode | () => React.ReactNode
94+
children: React.ReactNode | () => React.ReactNode | React.ReactNode[]
9595
}
9696
```
9797

@@ -114,7 +114,9 @@ import MyComponent from './MyComponent'
114114

115115
### Descriptions
116116

117-
You can add descriptions for your props by adding a comment on the line above the prop. Note: Description comments must be in the format `/** Description */`.
117+
You can add descriptions for your props by adding a comment on the line above the prop.
118+
119+
> Note: Description comments must be in the format `/** Description */`.
118120
119121
```js
120122
MyComponent.propTypes = {
@@ -131,7 +133,7 @@ MyComponent.propTypes = {
131133

132134
## `useComponents`
133135

134-
Hook responsible for access the components map passed as a to the `<ComponentsProvider>` of your theme.
136+
Hook responsible for accessing the components map passed as a prop to the `<ComponentsProvider>` of your theme.
135137

136138
```js
137139
import { useComponents } from 'docz'
@@ -205,7 +207,7 @@ export function useDocs(): Docs[]
205207
## `useMenus`
206208

207209
This hook will return the menu built by Docz using your documents.
208-
Use this to get your menus easier or use `useDocs` if you want the documents ordered like the order in your project configuration.
210+
Use this to quickly get your menus or use `useDocs` if you want the documents ordered in the order of your project configuration.
209211

210212
```js
211213
import { useMenus } from 'docz'
@@ -290,8 +292,9 @@ export function useConfig(): Config
290292

291293
## `theme()`
292294

293-
If you want to create your custom theme you need to use `theme()` function. It's a High Order Component that
294-
receives as the first parameter a `config` property and returns a function that receives your theme component as a parameter:
295+
If you want to create your custom theme you need to use the `theme()` function.
296+
It's a Higher Order Component that receives a `config` property as the first parameter
297+
and returns a function that receives your theme component as a parameter:
295298

296299
```js
297300
import React from 'react'

0 commit comments

Comments
 (0)