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

How do I make Fade responsive? #178

Closed
jungsikjeong opened this issue Jul 18, 2023 · 2 comments
Closed

How do I make Fade responsive? #178

jungsikjeong opened this issue Jul 18, 2023 · 2 comments

Comments

@jungsikjeong
Copy link

 <Contents>
            <Fade>
              <h1 className='title'>title..</h1>

              <div className='text'>
                <Fade delay={1e3} cascade damping={0.3e-1}>
                    some texts...some texts...some texts...some texts...
                </Fade>
              </div>
            </Fade>
</Contents>

I wrote this.
But when the screen gets smaller, the text goes through the div element.
display: inline-block; white-space: pre;
Fade of white-space: pre; I think it's because of this, so I tried:

import { Fade} from 'react-awesome-reveal';

const StyledFade = styled(Fade)`
  white-space: break-spaces;
`;

    <Contents>
              <Fade>
                <h1 className='title'>...</h1>

                <div className='text'>
                  <StyledFade delay={1e3} cascade damping={0.3e-1}>
                     ....
                  </StyledFade>
                </div>
              </Fade>
            </Contents>

The animation that appears one letter at a time does not work, but only the fade-in animation is working. How do I solve this?

@SteveAtKlover
Copy link

@jungsikjeong you can use something like https://www.npmjs.com/package/react-responsive to detect media queries in JS/TS

@morellodev
Copy link
Owner

This is not something in charge of this lib, closing this

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

3 participants