Skip to content

Commit 99b1bf8

Browse files
authored
Update README.md
1 parent 0de7fc2 commit 99b1bf8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ Set the wrapper component type. For example, this could also be `'footer'`, `'bu
103103

104104
You can also pass normal element attributes like `className` to the component.
105105

106+
```js
107+
<ScrollIntoViewIfNeeded elementType="span" className={styles.something}>
108+
<div>Hello</div>
109+
</ScrollIntoViewIfNeeded>
110+
```
111+
106112
## Upgrading from v1
107113

108114
This project has been updated along with `scroll-into-view-if-needed` and accepts the same `options`. Check out the [migration guide](https://www.npmjs.com/package/scroll-into-view-if-needed#breaking-api-changes-from-v1) over there!

0 commit comments

Comments
 (0)