Skip to content

Commit

Permalink
docs: import forwardRef into globals
Browse files Browse the repository at this point in the history
  • Loading branch information
Kadirsaglm authored and matyasf committed Sep 24, 2024
1 parent a5d0cee commit 1fa63c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/__docs__/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import React, { useContext, useEffect, useMemo, useState, useRef } from 'react'
import React, { forwardRef, useContext, useEffect, useMemo, useState, useRef } from 'react'
import ReactDOM from 'react-dom'

import { LoremIpsum } from 'lorem-ipsum'
Expand Down Expand Up @@ -87,6 +87,7 @@ const globals = {
useMemo,
useState,
useRef,
forwardRef,
additionalPrimitives,
dataVisualization,
ThemeColors,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-tooltip/src/Tooltip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Popover and Tooltip attach mouse and focus event listeners to their render trigg
```

- ```js
const MyComponent = React.forwardRef((props, ref) => {
const MyComponent = forwardRef((props, ref) => {
return (
<div {...props} ref={ref} style={{ width: '10rem' }}>
My custom component
Expand Down

0 comments on commit 1fa63c4

Please sign in to comment.