feishin/src/renderer/features/shared/components/play-button.tsx

31 lines
750 B
TypeScript
Raw Normal View History

import { motion } from 'framer-motion';
import { RiPlayFill } from 'react-icons/ri';
import styled from 'styled-components';
import { ButtonProps, _Button } from '/@/renderer/components';
const MotionButton = styled(motion(_Button))`
2022-12-29 19:23:07 -08:00
display: flex;
align-items: center;
justify-content: center;
background-color: var(--primary-color);
border: none;
border-radius: 50%;
2022-12-29 19:23:07 -08:00
opacity: 0.8;
transition: background-color 0.2s linear;
`;
export const PlayButton = ({ ...props }: Omit<ButtonProps, 'children'>) => {
return (
<MotionButton
2022-12-31 17:50:22 -08:00
h={50}
variant="filled"
2022-12-31 17:50:22 -08:00
w={50}
whileHover={{ scale: 1.1 }}
whileTap={{ scale: 0.95 }}
{...props}
>
2022-12-29 19:23:07 -08:00
<RiPlayFill size={20} />
</MotionButton>
);
};