diff --git a/stories/useParallax/useParallax.stories.tsx b/stories/useParallax/useParallax.stories.tsx index 048deecd..9cf1ba1f 100644 --- a/stories/useParallax/useParallax.stories.tsx +++ b/stories/useParallax/useParallax.stories.tsx @@ -1,15 +1,10 @@ import React from 'react'; -import { useParallax } from '../../src'; +import { ParallaxProps, useParallax } from '../../src'; import { Element } from '../Element/Element'; import { Container } from '../Container'; import styles from '../Parallax/Parallax.module.css'; -const Template = (args) => { - const props = Object.entries(args).reduce((acc: any, entry: any) => { - acc[entry[0]] = entry[1].split(','); - return acc; - }, {} as any); - +function ElementWithHook(props: ParallaxProps) { const { ref } = useParallax(props); return ( @@ -17,6 +12,14 @@ const Template = (args) => { ); +} + +const Template = (args) => { + const props = Object.entries(args).reduce((acc: any, entry: any) => { + acc[entry[0]] = entry[1].split(','); + return acc; + }, {} as any); + return ; }; export const WithRotation = Template.bind({});