feishin/src/renderer/features/lyrics/lyric-line.tsx

29 lines
683 B
TypeScript
Raw Normal View History

2023-05-22 17:38:31 -07:00
import { ComponentPropsWithoutRef } from 'react';
import { TextTitle } from '/@/renderer/components/text-title';
import styled from 'styled-components';
2023-05-22 17:38:31 -07:00
interface LyricLineProps extends ComponentPropsWithoutRef<'div'> {
text: string;
2023-05-22 17:38:31 -07:00
}
const StyledText = styled(TextTitle)`
2023-06-03 18:03:32 -07:00
color: var(--main-fg);
font-weight: 100;
2023-06-03 18:03:32 -07:00
font-size: 2vmax;
line-height: 3.5vmax;
opacity: 0.5;
2023-06-03 18:03:32 -07:00
&.active {
font-weight: 800;
2023-06-03 18:03:32 -07:00
font-size: 2.5vmax;
line-height: 4vmax;
opacity: 1;
}
2023-06-03 18:03:32 -07:00
transition: opacity 0.3s ease-in-out, font-size 0.3s ease-in-out;
`;
export const LyricLine = ({ text, ...props }: LyricLineProps) => {
return <StyledText {...props}>{text}</StyledText>;
2023-05-22 17:38:31 -07:00
};