fix: add key

This commit is contained in:
fantasticit 2022-05-01 23:04:53 +08:00
parent d0165bad1e
commit 881b1c6846
1 changed files with 8 additions and 1 deletions

View File

@ -60,7 +60,12 @@ export const CalloutBubbleMenu: React.FC<{ editor: Editor }> = ({ editor }) => {
<Text type="secondary"></Text>
<div>
{TEXT_COLORS.map((color) => (
<div className={styles.color} style={{ color: color }} onClick={setColor('textColor', color)}>
<div
key={color}
className={styles.color}
style={{ color: color }}
onClick={setColor('textColor', color)}
>
A
</div>
))}
@ -72,6 +77,7 @@ export const CalloutBubbleMenu: React.FC<{ editor: Editor }> = ({ editor }) => {
<div>
{BORDER_COLORS.map((color) => (
<div
key={color}
className={styles.color}
style={{ backgroundColor: color }}
onClick={setColor('borderColor', color)}
@ -84,6 +90,7 @@ export const CalloutBubbleMenu: React.FC<{ editor: Editor }> = ({ editor }) => {
<div>
{BACKGROUND_COLORS.map((color) => (
<div
key={color}
className={styles.color}
style={{ backgroundColor: color }}
onClick={setColor('backgroundColor', color)}