Skip to content

Commit

Permalink
chore(ColorPicker): remove meaningless code
Browse files Browse the repository at this point in the history
  • Loading branch information
l123wx committed Nov 21, 2024
1 parent 035faaa commit 6819fe2
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/color-picker/components/panel/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,13 @@ const Header = (props: ColorPanelHeaderProps) => {
return (
<div className={`${baseClassName}__head`}>
<div className={`${baseClassName}__mode`}>
{colorModes?.length === 1 ? (
COLOR_MODES[colorModes[0]]
) : (
<Radio.Group variant="default-filled" size="small" value={mode} onChange={onModeChange}>
{Object.keys(COLOR_MODES).map((key) => (
<Radio.Button key={key} value={key}>
{t(local[COLOR_MODES[key]])}
</Radio.Button>
))}
</Radio.Group>
)}
<Radio.Group variant="default-filled" size="small" value={mode} onChange={onModeChange}>
{Object.keys(COLOR_MODES).map((key) => (
<Radio.Button key={key} value={key}>
{t(local[COLOR_MODES[key]])}
</Radio.Button>
))}
</Radio.Group>
</div>
</div>
);
Expand Down

0 comments on commit 6819fe2

Please sign in to comment.