Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulse causes error #42

Closed
BroFox86 opened this issue Sep 3, 2020 · 2 comments
Closed

Pulse causes error #42

BroFox86 opened this issue Sep 3, 2020 · 2 comments

Comments

@BroFox86
Copy link

BroFox86 commented Sep 3, 2020

Pulse animation causes error in my create-react-app template. Other animations work well.

Code:

import React from "react";
import { setPageInfo } from "../../helpers/setPageInfo";
import { MainLayout } from "../../layouts/MainLayout";
import { Pulse } from "react-awesome-reveal";

export function Animations() {

  setPageInfo( "Animations", "This is animation sandbox." );
 
  return(
    <MainLayout>
      
      <section>
        <Pulse> 
          <h1>Pulse animation</h1>
        </Pulse>
      </section>

    </MainLayout>
  )
}

Снимок экрана 2020-09-03 в 16 10 14

@morellodev
Copy link
Owner

Hi @BroFox86, since version 3 all attention seeker animations are wrapped by the AttentionSeeker component, which accept a prop named effect that specifies the animation you want to render: "bounce" | "flash" | "headShake" | "heartBeat" | "jello" | "pulse" | "rubberBand" | "shake" | "shakeX" | "shakeY" | "swing" | "tada" | "wobble".

In your case, you have to refactor your code to:

import React from "react";
import { setPageInfo } from "../../helpers/setPageInfo";
import { MainLayout } from "../../layouts/MainLayout";
import { AttentionSeeker } from "react-awesome-reveal";

export function Animations() {
  setPageInfo( "Animations", "This is animation sandbox." );

  return (
    <MainLayout>
      <section>
        <AttentionSeeker effect="pulse">
          <h1>Pulse animation</h1>
        </AttentionSeeker>
      <section>
    </MainLayout>
  );
}

Let me know if it fixes your issue.

@BroFox86
Copy link
Author

BroFox86 commented Sep 3, 2020

@dennismorello, It works! Thank you!

@BroFox86 BroFox86 closed this as completed Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants