Skip to content

Commit f1d6809

Browse files
docs: replace innerRef to ref in CSS-in-JS library docs
The naming was a typo, the prop is called `ref`, not `InnerRef`.
1 parent 912964d commit f1d6809

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-focus-within/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If you want to react to the focus change, use function as a children pattern. Wh
6464

6565
## Using with CSS-in-JS libs
6666

67-
If you're using a CSS-in-JS library like [styled-components](https://www.styled-components.com) you need to pass a ref using `innerRef` prop. You can use `getRef` function from the parameters.
67+
If you're using a CSS-in-JS library like [styled-components](https://www.styled-components.com) you need to pass a ref using `ref` prop. You can use `getRef` function from the parameters.
6868

6969
```js static
7070
;({ focused: Boolean, getRef: Function }) => React.Element
@@ -91,7 +91,7 @@ const StyledBox = styled('div')`
9191
}}
9292
>
9393
{({ focused, getRef }) => (
94-
<StyledBox innerRef={getRef} focused={focused}>
94+
<StyledBox ref={getRef} focused={focused}>
9595
<input
9696
type="text"
9797
placeholder="Click to activate first input"

0 commit comments

Comments
 (0)