11import { useMemo , useRef } from 'react' ;
2+ import classNames from 'classnames' ;
23import {
34 mdiFacebook ,
45 mdiGithub ,
@@ -11,7 +12,6 @@ import {
1112import Icon from '@mdi/react' ;
1213import { IPerson } from '../../services/people' ;
1314import styles from './personCard.module.scss' ;
14- import colors from '../../styles/colors' ;
1515import ShowMore from '../showMore/showMore' ;
1616import Label from '../label/label' ;
1717
@@ -35,7 +35,6 @@ export function PersonCard({ person }: IPersonProps) {
3535 roles,
3636 customImage,
3737 } = person ;
38- const theme = useMemo ( ( ) => themeColor ?? colors . secondary_color , [ themeColor ] ) ;
3938 const icons = useMemo (
4039 ( ) => [
4140 { link : github , icon : mdiGithub } ,
@@ -54,7 +53,12 @@ export function PersonCard({ person }: IPersonProps) {
5453 const onToggleCard = ( ) => card ?. current ?. classList . toggle ( styles . card__open ) ;
5554
5655 return (
57- < div ref = { card } className = { styles . card } style = { { borderBottomColor : theme } } >
56+ < div
57+ ref = { card }
58+ className = { classNames ( styles . card , {
59+ [ `${ styles . card_default_theme } ` ] : ! themeColor ,
60+ } ) }
61+ >
5862 < div
5963 className = { styles . card__img }
6064 style = { {
@@ -94,7 +98,12 @@ export function PersonCard({ person }: IPersonProps) {
9498 href = { link . startsWith ( 'https://' ) ? link : `https://github.com/${ link } ` }
9599 rel = "noreferrer"
96100 >
97- < Icon className = "icon" path = { icon } style = { { color : theme } } />
101+ < Icon
102+ className = { classNames ( {
103+ [ `${ styles . icon_default_theme } ` ] : ! themeColor ,
104+ } ) }
105+ path = { icon }
106+ />
98107 </ a >
99108 )
100109 ) }
0 commit comments