Skip to content

Commit 2cea2e7

Browse files
Add color palette update, to consume classnames as well
1 parent 01edb51 commit 2cea2e7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

components/color-palette.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
import { Dispatch, RefObject, SetStateAction } from 'react';
22
import { Color } from '@/hooks/useColorPalette';
33
import { getLightModeColor, getDarkModeColor } from '@/common/common';
4+
import { cn } from '@/lib/utils';
5+
import { type ClassValue } from 'clsx';
46

57
export const ColorPalette = ({
68
colorPaletteRef,
79
bgColors,
810
setBgColor,
11+
className,
912
}: {
1013
colorPaletteRef: RefObject<HTMLDivElement>;
1114
bgColors: Color[];
1215
setBgColor: Dispatch<SetStateAction<Color>>;
16+
className?: ClassValue;
1317
}) => {
1418
return (
1519
<div
16-
className="fixed inset-0 max-w-full min-h-fit px-2 py-4 md:py-0 bg-zinc-900 flex items-center justify-center flex-wrap gap-2 dark:rounded-xl z-50"
20+
className={cn(
21+
'fixed inset-0 max-w-full min-h-fit md:h-12 px-2 py-4 md:py-0 bg-zinc-900 flex items-center justify-center flex-wrap gap-2 dark:rounded-xl z-50',
22+
className
23+
)}
1724
ref={colorPaletteRef}
1825
>
1926
{bgColors.map(color => (

0 commit comments

Comments
 (0)