FIX: color picker and border issues

This commit is contained in:
Nicolás Hatcher
2024-11-01 22:22:28 +01:00
committed by Nicolás Hatcher Andrés
parent 47acd0d600
commit d08fe32f97
4 changed files with 216 additions and 108 deletions

View File

@@ -103,25 +103,33 @@ const ColorPicker = (properties: ColorPickerProps) => {
/>
))}
</ColorList>
<HorizontalDivider />
<RecentLabel>{"Recent"}</RecentLabel>
<ColorList>
{recentColors.current.map((recentColor) => (
<Button
key={recentColor}
$color={recentColor}
onClick={(): void => {
closePicker(recentColor);
}}
/>
))}
</ColorList>
{recentColors.current.length > 0 ? (
<>
<HorizontalDivider />
<RecentLabel>{"Recent"}</RecentLabel>
<ColorList>
{recentColors.current.map((recentColor) => (
<Button
key={recentColor}
$color={recentColor}
onClick={(): void => {
closePicker(recentColor);
}}
/>
))}
</ColorList>
</>
) : (
<div />
)}
</ColorPickerDialog>
</Popover>
);
};
const RecentLabel = styled.div`
font-family: "Inter";
font-size: 12px;
color: ${theme.palette.text.secondary};
`;