mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 16:51:33 +10:00
🚀 release: v3.0.0
This commit is contained in:
39
apps/client/components/dashboard/ResumeCard.tsx
Normal file
39
apps/client/components/dashboard/ResumeCard.tsx
Normal file
@ -0,0 +1,39 @@
|
||||
import { SvgIconComponent } from '@mui/icons-material';
|
||||
import { ButtonBase } from '@mui/material';
|
||||
|
||||
import { useAppDispatch } from '@/store/hooks';
|
||||
import { ModalName, setModalState } from '@/store/modal/modalSlice';
|
||||
|
||||
import styles from './ResumeCard.module.scss';
|
||||
|
||||
type Props = {
|
||||
modal: ModalName;
|
||||
icon: SvgIconComponent;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
};
|
||||
|
||||
const ResumeCard: React.FC<Props> = ({ modal, icon: Icon, title, subtitle }) => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const handleClick = () => {
|
||||
dispatch(setModalState({ modal, state: { open: true } }));
|
||||
};
|
||||
|
||||
return (
|
||||
<section className={styles.resume}>
|
||||
<ButtonBase className={styles.preview} onClick={handleClick}>
|
||||
<Icon sx={{ fontSize: 64 }} />
|
||||
</ButtonBase>
|
||||
|
||||
<footer>
|
||||
<div className={styles.meta}>
|
||||
<p>{title}</p>
|
||||
<p>{subtitle}</p>
|
||||
</div>
|
||||
</footer>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default ResumeCard;
|
||||
Reference in New Issue
Block a user