fix: add key

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