调整色卡中颜色名称输出内容,方便未来适配其他色卡系列。
This commit is contained in:
parent
67164e35fa
commit
c737712d3f
|
@ -1,4 +1,4 @@
|
|||
import { capitalize } from 'lodash-es';
|
||||
import { capitalize, isEmpty } from 'lodash-es';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { useColorFunction } from '../../ColorFunctionContext';
|
||||
import { useCopyColor } from '../../hooks/useCopyColor';
|
||||
|
@ -65,7 +65,9 @@ export function ColorCard({ color, copyMode }: ColorCardProps) {
|
|||
<div className={styles.description_line}>
|
||||
<div className={styles.title}>
|
||||
<span className={styles.name}>{color.name}</span>
|
||||
{!isEmpty(color.pinyin) && (
|
||||
<span className={styles.en_name}>{color.pinyin.map(capitalize).join(' ')}</span>
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.color_value}>#{colorHex}</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user