Skip to content

Instantly share code, notes, and snippets.

View peeyush14goyal's full-sized avatar

Peeyush Goyal peeyush14goyal

  • India
View GitHub Profile
<div className="hovs-banner" id="hovs-banner">
{state &&
state.nodes &&
state.nodes.map((x, i) => {
return (
<div key={i} className="hovs-main">
<div
id={"hovs-main-scroll-comp-" + i.toString()}
onMouseEnter={() => handleMouseEnter(i)}
>
Param Type Description
nodes Array of HTML Elements Array of the Base Components (Movie Images). Simple div elements are created with their content as index + 1
hover_nodes Array of HTML Elements Array of the Hover components corresponding to the Base components
scroll_by Integer Scroll left or right by <scroll_by>px
hover_pos_x Integer Adjust the x position of Hover component
hover_pos_y Integer Adjust the y position of Hover component
width Integer(%|px) Width of the MainDiv component
/* Main Div Component */
const MovieComp = () => {
return <div className="hovs-main"></div>
}