Skip to content

Instantly share code, notes, and snippets.

@kitze
Created October 1, 2019 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitze/105401aab774ce945dfa8e5693e74e26 to your computer and use it in GitHub Desktop.
Save kitze/105401aab774ce945dfa8e5693e74e26 to your computer and use it in GitHub Desktop.
AnimatedTitle
import React from 'react';
import { Reveal } from 'styles/reveal';
import * as T from 'styles/shared-components/text';
//styles
import * as S from './styles';
import * as A from 'styles/shared-components';
import * as L from 'layout-styled-components';
const AnimatedTitle: React.FC<{ size?: number }> = ({ children='', size = 50 }) => {
return (
<S.AnimatedTitle>
<L.Horizontal wrap center spaceAll={8}>
{(children as string).split(' ').map((word, index) => (
<Reveal delay={index * 100}>
<S.Text bold size={size}>
{word}
</S.Text>
</Reveal>
))}
</L.Horizontal>
</S.AnimatedTitle>
);
};
export default AnimatedTitle;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment