import { Paragraph } from
"@rsuite/icons"
;
import React, { createRef } from
"react"
;
import { Affix, Button, Nav } from
"rsuite/"
;
import
"rsuite/dist/rsuite.min.css"
;
export
default
function
App() {
const containerRef = createRef();
return
(
<center>
<div>
<h2>GeeksforGeeks</h2>
<h4 style={{ color:
"green"
}}>
React Suite Affix Container
</h4>
<div ref={containerRef}
style={{ background:
"white"
}}>
<Paragraph style={{ fontSize: 1000 }}
rows={10} />
<Affix
top={0}
container={() => {
return
containerRef.current;
}}
>
<Nav style={{ backgroundColor:
'black'
}}>
<Nav.Item>Home</Nav.Item>
<Nav.Item>Practice</Nav.Item>
<Nav.Item>Tutorials</Nav.Item>
<Nav.Item>Contact us</Nav.Item>
<Nav.Item>About</Nav.Item>
</Nav>
</Affix>
</div>
<Paragraph style={{ fontSize: 1000 }} rows={20} />
</div>
</center>
);
}