/** * @flow * @file File Keywords SkillCard component * @author Box */ import * as React from 'react'; import classNames from 'classnames'; import PlainButton from '../../../../components/plain-button/PlainButton'; import IconClose from '../../../../icons/general/IconClose'; import IconMinus from '../../../../icons/general/IconMinus'; import { SKILLS_TARGETS } from '../../../common/interactionTargets'; import { COLOR_999, COLOR_WHITE } from '../../../../constants'; import type { SkillCardEntry } from '../../../../common/types/skills'; import './Face.scss'; type Props = { face: SkillCardEntry, isEditing: boolean, onDelete: Function, onSelect: Function, selected?: SkillCardEntry, }; const Face = ({ face, selected, isEditing, onDelete, onSelect }: Props) => { const isAnyFaceSelected = !!selected; const isCurrentFaceSelected = face === selected; const isFaceSelected = isAnyFaceSelected && isCurrentFaceSelected && !isEditing; const faceClassName = classNames('be-face-wrapper', { 'be-face-unselected': !isEditing && isAnyFaceSelected && !isCurrentFaceSelected, }); return (