Skip to content

Commit

Permalink
feat(design): update color presets and add tests for ColorPicker
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai committed Feb 5, 2025
1 parent ff4ae42 commit e09e023
Show file tree
Hide file tree
Showing 5 changed files with 1,150 additions and 6 deletions.
6 changes: 4 additions & 2 deletions packages/design/src/components/color-picker/ColorPresets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ export function ColorPresets({ hsv, onChange }: IColorPresetsProps) {
key={j}
type="button"
className={clsx(`
univer-h-5 univer-w-5 univer-cursor-pointer univer-rounded-full univer-border-none
univer-bg-gray-300 univer-transition-shadow
univer-box-border univer-h-5 univer-w-5 univer-cursor-pointer univer-rounded-full
univer-border univer-border-solid univer-border-transparent univer-bg-gray-300
univer-transition-shadow
`, {
'univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:univer-ring-primary-600 dark:univer-ring-offset-gray-600': color.toUpperCase() === currentColor.toUpperCase(),
'!univer-border-gray-200': i === 0 && j === 0,
})}
style={{ backgroundColor: color }}
onClick={() => handleSelectPreset(color)}
Expand Down
Loading

0 comments on commit e09e023

Please sign in to comment.