Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kangjuhyup committed Jan 19, 2025
1 parent 14e13bc commit 146623c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/page/src/components/background/background.select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ interface BackgroundSelectProps {
onImageSelect: (image: string) => void;
}

const BackgroundSelect = ({ onColorSelect, onImageSelect }: BackgroundSelectProps) => {
const BackgroundSelect = ({
onColorSelect,
onImageSelect,
}: BackgroundSelectProps) => {
const [isColorMode, setIsColorMode] = useState(true);

const handleImageChange = (file: File | null) => {
Expand All @@ -22,7 +25,7 @@ const BackgroundSelect = ({ onColorSelect, onImageSelect }: BackgroundSelectProp

return (
<Stack>
<Group position="center">
<Group>
<Button
variant={isColorMode ? 'filled' : 'light'}
onClick={() => setIsColorMode(true)}
Expand Down Expand Up @@ -64,9 +67,10 @@ const BackgroundSelect = ({ onColorSelect, onImageSelect }: BackgroundSelectProp
<FileInput
placeholder="이미지 선택"
accept="image/*"
icon={<IconPhoto size={14} />}
onChange={handleImageChange}
/>
>
<IconPhoto size={14} />
</FileInput>
)}
</Stack>
);
Expand Down

0 comments on commit 146623c

Please sign in to comment.