增加尚未选择颜色的提示。

This commit is contained in:
徐涛 2025-01-27 08:08:43 +08:00
parent 50646ffccf
commit 14851c8284
2 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,10 @@
border-radius: var(--border-radius-xxs);
border: 1px solid var(--color-border);
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
font-size: var(--font-size-xs);
}
}
.picker {

View File

@ -35,7 +35,9 @@ export function FloatColorPicker({ name, color, onPick }: FloatColorPickerProps)
onClick={() => setPickerShow(true)}
style={{
backgroundColor: isNil(pickedColor) ? 'rgba(0, 0, 0, 0)' : `#${pickedColor}`,
}}></div>
}}>
{isNil(pickedColor) && <span>N/A</span>}
</div>
<ActionIcon icon="tabler:x" onClick={() => handlePickAction(null)} />
</div>
{showPicker && (