Update the frontend to adhere to the custom eslint rule twenty/no-spread-props (#1958)
* Update the frontend to adhere to the custom eslint rule `twenty/no-spread-props` Co-authored-by: v1b3m <vibenjamin6@gmail.com> * Update the frontend to adhere to the custom eslint rule `twenty/no-spread-props` Co-authored-by: v1b3m <vibenjamin6@gmail.com> * resolve bug with data-testid --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
@ -10,20 +10,13 @@ type AnimatedEaseInProps = Omit<
|
||||
export const AnimatedEaseIn = ({
|
||||
children,
|
||||
duration = 0.3,
|
||||
...restProps
|
||||
}: AnimatedEaseInProps) => {
|
||||
const initial = { opacity: 0 };
|
||||
const animate = { opacity: 1 };
|
||||
const transition = { ease: 'linear', duration };
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
initial={initial}
|
||||
animate={animate}
|
||||
transition={transition}
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
{...restProps}
|
||||
>
|
||||
<motion.div initial={initial} animate={animate} transition={transition}>
|
||||
{children}
|
||||
</motion.div>
|
||||
);
|
||||
|
||||
@ -47,10 +47,7 @@ const childAnimation = {
|
||||
},
|
||||
};
|
||||
|
||||
export const AnimatedTextWord = ({
|
||||
text = '',
|
||||
...restProps
|
||||
}: AnimatedTextWordProps) => {
|
||||
export const AnimatedTextWord = ({ text = '' }: AnimatedTextWordProps) => {
|
||||
const words = useMemo(() => {
|
||||
const words = text.split(' ');
|
||||
|
||||
@ -64,8 +61,6 @@ export const AnimatedTextWord = ({
|
||||
variants={containerAnimation}
|
||||
initial="hidden"
|
||||
animate="visible"
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
{...restProps}
|
||||
>
|
||||
{words.map((word, index) => (
|
||||
<StyledWord variants={childAnimation} key={index}>
|
||||
|
||||
Reference in New Issue
Block a user