mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 10:02:27 -04:00
* Test * Add pretty formatting * Fix Tests * Fix Tests * Fix Tests * Fix * Add pretty formatting fix * Fix * Test * Fix tests * Clean typeckech * Add prettier check * Fix api tsconfig * Fix api tsconfig * Fix tsconfig * Fix * Fix * Prettier
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import clsx from 'clsx'
|
|
import {type Gender} from 'common/gender'
|
|
import {BsFillPersonFill} from 'react-icons/bs'
|
|
import {
|
|
PiGenderFemaleBold,
|
|
PiGenderMaleBold,
|
|
PiGenderNonbinaryBold,
|
|
PiGenderTransgenderBold,
|
|
} from 'react-icons/pi'
|
|
|
|
export default function GenderIcon(props: {gender: Gender; className: string; hasColor?: boolean}) {
|
|
const {gender, className, hasColor} = props
|
|
if (gender == 'male') {
|
|
return (
|
|
<PiGenderMaleBold
|
|
className={clsx(className, hasColor ? 'text-blue-500 dark:text-blue-300' : '')}
|
|
/>
|
|
)
|
|
}
|
|
if (gender == 'female') {
|
|
return (
|
|
<PiGenderFemaleBold
|
|
className={clsx(className, hasColor ? 'text-pink-500 dark:text-pink-300' : '')}
|
|
/>
|
|
)
|
|
}
|
|
if (gender == 'non-binary') {
|
|
return (
|
|
<PiGenderNonbinaryBold
|
|
className={clsx(className, hasColor ? 'text-purple-500 dark:text-purple-300' : '')}
|
|
/>
|
|
)
|
|
}
|
|
if (gender == 'trans-female') {
|
|
return (
|
|
<PiGenderTransgenderBold
|
|
className={clsx(className, hasColor ? 'text-pink-500 dark:text-pink-300' : '')}
|
|
/>
|
|
)
|
|
}
|
|
if (gender == 'trans-male') {
|
|
return (
|
|
<PiGenderTransgenderBold
|
|
className={clsx(className, hasColor ? 'text-blue-500 dark:text-blue-300' : '')}
|
|
/>
|
|
)
|
|
}
|
|
return (
|
|
<BsFillPersonFill
|
|
className={clsx(className, hasColor ? 'text-blue-500 dark:text-blue-300' : '')}
|
|
/>
|
|
)
|
|
}
|