Add shared items
- Play button - Play types
This commit is contained in:
parent
131d7c5e3b
commit
dc6936b22c
3 changed files with 41 additions and 0 deletions
23
src/renderer/features/shared/components/play-button.tsx
Normal file
23
src/renderer/features/shared/components/play-button.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
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))`
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
`;
|
||||
|
||||
export const PlayButton = ({ ...props }: Omit<ButtonProps, 'children'>) => {
|
||||
return (
|
||||
<MotionButton
|
||||
variant="filled"
|
||||
whileHover={{ scale: 1.1 }}
|
||||
whileTap={{ scale: 0.95 }}
|
||||
{...props}
|
||||
>
|
||||
<RiPlayFill size={15} />
|
||||
</MotionButton>
|
||||
);
|
||||
};
|
|
@ -1,2 +1,4 @@
|
|||
export * from './components/animated-page';
|
||||
export * from './queries/music-folders-query';
|
||||
export * from './components/play-button';
|
||||
export * from './utils';
|
||||
|
|
16
src/renderer/features/shared/utils.ts
Normal file
16
src/renderer/features/shared/utils.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Play } from '/@/renderer/types';
|
||||
|
||||
export const PLAY_TYPES = [
|
||||
{
|
||||
label: 'Play',
|
||||
play: Play.NOW,
|
||||
},
|
||||
{
|
||||
label: 'Add to queue (last)',
|
||||
play: Play.LAST,
|
||||
},
|
||||
{
|
||||
label: 'Add to queue (next)',
|
||||
play: Play.NEXT,
|
||||
},
|
||||
];
|
Reference in a new issue