Files
twenty/front/src/modules/auth/components/ui/Title.tsx
T
Jérémy M 433962321a feat: onboarding ui flow (#464)
* feat: onboarding ui flow

* fix: route naming and auth

* fix: clean unused imports

* fix: remove react.fc

* fix: infra dev remove package.json

* fix: remove usefull memoization

* fix: button stories

* fix: use type instead of interface

* fix: remove debug
2023-06-30 06:26:06 +00:00

29 lines
857 B
TypeScript

import React from 'react';
import styled from '@emotion/styled';
import { AnimatedTextWord } from '@/ui/components/motion/AnimatedTextWord';
type Props = React.PropsWithChildren & {
animate?: boolean;
};
const StyledTitle = styled.div`
color: ${({ theme }) => theme.font.color.primary};
font-size: ${({ theme }) => theme.font.size.xl};
font-weight: ${({ theme }) => theme.font.weight.semiBold};
`;
const StyledAnimatedTextWord = styled(AnimatedTextWord)`
color: ${({ theme }) => theme.font.color.primary};
font-size: ${({ theme }) => theme.font.size.xl};
font-weight: ${({ theme }) => theme.font.weight.semiBold};
`;
export function Title({ children, animate = false }: Props) {
if (animate && typeof children === 'string') {
return <StyledAnimatedTextWord text={children} />;
}
return <StyledTitle>{children}</StyledTitle>;
}