@netdata/netdata-ui
Version:
netdata UI kit
30 lines (24 loc) • 567 B
Markdown
is visible to the viewport.
It uses the IntersectionObserver.
```typescript
interface IntersectionProps {
root: object
rootMargin: string
threshold: number
fallback: ReactNode | (() => ReactNode)
children: ReactNode | (() => ReactNode)
[ ]: any
}
```
```JSX
export const Component = () => {
return (
<Intersection fallback="This is visible outside the viewport">
This is visible inside the viewport
</Intersection>
)
}
```
A component that displays the fallback until it