Skip to content

Commit 323a0df

Browse files
committed
Feat: v1_complate
1 parent c617c01 commit 323a0df

File tree

12 files changed

+47
-44
lines changed

12 files changed

+47
-44
lines changed

src/basic-ui/miniButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const uiSizeStyle = {
3030
[MiniUiSize.NONE]: "",
3131
};
3232

33-
export default function MiniButton({
33+
export const MiniButton = ({
3434
children,
3535
className = "",
3636

@@ -40,7 +40,7 @@ export default function MiniButton({
4040
uiHover,
4141
viewport = defaultViewport,
4242
...props
43-
}: ButtonProps) {
43+
}: ButtonProps) => {
4444
const animation: Variants = mergeVariants(uiMotion, uiHover);
4545
const baseStyle = `${uiSizeStyle[uiSize]} ${uiStyle[ui]} font-semibold`;
4646

src/basic-ui/miniImage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ export interface MiniImageProps
99
viewport?: ViewportOptions;
1010
}
1111

12-
export default function MiniImage({
12+
export const MiniImage = ({
1313
className = "",
1414
uiMotion,
1515
uiHover,
1616
uiSize,
1717
ui,
1818
viewport = defaultViewport,
1919
...props
20-
}: MiniImageProps) {
20+
}: MiniImageProps) => {
2121
return (
2222
<MiniBox
2323
uiMotion={uiMotion}
@@ -28,4 +28,4 @@ export default function MiniImage({
2828
<img className={`w-full h-full object-cover`} {...props} />
2929
</MiniBox>
3030
);
31-
}
31+
};

src/basic-ui/miniInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const uiSizeStyle = {
2828
[MiniUiSize.NONE]: "",
2929
};
3030

31-
export default function MiniInput({
31+
export const MiniInput = ({
3232
label,
3333
className,
3434

@@ -38,7 +38,7 @@ export default function MiniInput({
3838
uiMotion: motion,
3939
viewport = defaultViewport,
4040
...props
41-
}: InputProps) {
41+
}: InputProps) => {
4242
const animation: Variants = mergeVariants(motion, hover);
4343
const baseStyle = "";
4444

src/basic-ui/miniRadiaChart.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ interface MiniRadiaChartProp extends PolarChartProps {
2727
matchData?: MiniMatchType[];
2828
}
2929

30-
export default function MiniRadiaChart({
30+
export const MiniRadiaChart = ({
3131
label,
3232
width = 150,
3333
height = 150,
3434
matchData = [{ name: "적합도", value: 50, fill: "var(--brand)" }],
3535
...props
36-
}: MiniRadiaChartProp) {
36+
}: MiniRadiaChartProp) => {
3737
const value = matchData[0]?.value ?? 0;
3838

3939
return (
@@ -55,4 +55,4 @@ export default function MiniRadiaChart({
5555
<p className="text-2xl text-[var(--text-light)] mt-[-10px]">{value}%</p>
5656
</div>
5757
);
58-
}
58+
};

src/basic-ui/miniTextarea.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const uiSizeStyle = {
2828
[MiniUiSize.NONE]: "",
2929
};
3030

31-
export default function MiniTextarea({
31+
export const MiniTextarea = ({
3232
label,
3333
className,
3434

@@ -38,7 +38,7 @@ export default function MiniTextarea({
3838
uiMotion: motion,
3939
viewport = defaultViewport,
4040
...props
41-
}: InputProps) {
41+
}: InputProps) => {
4242
const animation: Variants = mergeVariants(motion, hover);
4343
const baseStyle = "";
4444

@@ -60,4 +60,4 @@ export default function MiniTextarea({
6060
/>
6161
</div>
6262
);
63-
}
63+
};

src/section/miniHeroSection.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import MiniCarousel, { CarouselImageType } from "../ui/miniCarousel";
1+
import { CarouselImageType, MiniCarousel } from "../ui";
22

33
interface MiniHeroSectionProps {
44
className?: string;
@@ -7,12 +7,12 @@ interface MiniHeroSectionProps {
77
image?: string[];
88
}
99

10-
export default function MiniHeroSection({
10+
export const MiniHeroSection = ({
1111
className = "",
1212
children,
1313
video,
1414
image,
15-
}: MiniHeroSectionProps) {
15+
}: MiniHeroSectionProps) => {
1616
if (image && image.length > 1) {
1717
const imageData: CarouselImageType[] = image.map((imgSrc) => ({
1818
image: imgSrc,
@@ -43,4 +43,4 @@ export default function MiniHeroSection({
4343
}
4444

4545
return;
46-
}
46+
};

src/ui/dropdown/miniDropdown.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
import { useState, useRef, useEffect } from "react";
44
import { motion } from "framer-motion";
5-
import MiniSelect, { OptionType } from "./miniSelect";
65
import { MiniUiType } from "../../miniComponentConfig";
7-
import { ButtonProps } from "../../basic-ui";
8-
import MiniButton from "../../basic-ui/miniButton";
6+
import { ButtonProps, MiniButton } from "../../basic-ui";
7+
import { MiniSelect, OptionType } from "./miniSelect";
98

109
// === MiniDropdown Props ===
1110
interface MiniDropdownProps extends ButtonProps {
@@ -26,14 +25,14 @@ const uiStyle = {
2625
};
2726

2827
// === 컴포넌트 ===
29-
export default function MiniDropdown({
28+
export const MiniDropdown = ({
3029
label,
3130
options,
3231
placeholder = "선택하세요",
3332
className = "",
3433
onValueSelect,
3534
...props
36-
}: MiniDropdownProps) {
35+
}: MiniDropdownProps) => {
3736
const [isOpen, setIsOpen] = useState(false);
3837
const [selected, setSelected] = useState<string>("");
3938
const ref = useRef<HTMLDivElement>(null);

src/ui/dropdown/miniImageDropdown.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
"use client";
22

33
import { useState, useRef, useEffect } from "react";
4-
import MiniSelect, { OptionType } from "./miniSelect";
5-
import { MiniComponetType, MiniUiSize, MiniUiType } from "../../miniComponentConfig";
6-
import MiniImage from "../../basic-ui/miniImage";
4+
import {
5+
MiniComponetType,
6+
MiniUiSize,
7+
MiniUiType,
8+
} from "../../miniComponentConfig";
9+
import { MiniImage } from "../../basic-ui";
10+
import { MiniSelect, OptionType } from "./miniSelect";
711

812
// === MiniDropdown Props ===
913
interface MiniDropdownProps
@@ -25,7 +29,7 @@ const uiStyle = {
2529
};
2630

2731
// === 컴포넌트 ===
28-
export default function MiniImageDropdown({
32+
export const MiniImageDropdown = ({
2933
options,
3034
image,
3135
onValueSelect,
@@ -35,7 +39,7 @@ export default function MiniImageDropdown({
3539
uiMotion,
3640
uiHover,
3741
...props
38-
}: MiniDropdownProps) {
42+
}: MiniDropdownProps) => {
3943
const [isOpen, setIsOpen] = useState(false);
4044
const [selected, setSelected] = useState<string>("");
4145
const ref = useRef<HTMLDivElement>(null);
@@ -68,4 +72,4 @@ export default function MiniImageDropdown({
6872
<MiniSelect isOpen={isOpen} options={options} onSelect={handleSelect} />
6973
</div>
7074
);
71-
}
75+
};

src/ui/dropdown/miniSelect.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ interface MiniDropdownListProps {
1414
className?: string;
1515
}
1616

17-
export default function MiniSelect({
17+
export const MiniSelect = ({
1818
isOpen,
1919
options,
2020
onSelect,
2121
className = "",
22-
}: MiniDropdownListProps) {
22+
}: MiniDropdownListProps) => {
2323
return (
2424
<AnimatePresence>
2525
{isOpen && (
@@ -53,4 +53,4 @@ export default function MiniSelect({
5353
)}
5454
</AnimatePresence>
5555
);
56-
}
56+
};

src/ui/miniCarousel.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
'use client';
1+
"use client";
22

3-
import { motion, AnimatePresence } from 'framer-motion';
4-
import { ChevronLeft, ChevronRight } from 'lucide-react';
5-
import { useState } from 'react';
3+
import { motion, AnimatePresence } from "framer-motion";
4+
import { ChevronLeft, ChevronRight } from "lucide-react";
5+
import { useState } from "react";
66

77
export interface CarouselImageType {
88
children?: React.ReactNode;
@@ -15,7 +15,7 @@ interface CarouselProps {
1515
className?: string;
1616
}
1717

18-
export default function MiniCarousel({ images, className }: CarouselProps) {
18+
export const MiniCarousel = ({ images, className }: CarouselProps) => {
1919
const [index, setIndex] = useState(0);
2020

2121
const next = () => setIndex((prev) => (prev + 1) % images.length);
@@ -59,11 +59,11 @@ export default function MiniCarousel({ images, className }: CarouselProps) {
5959
<div
6060
key={i}
6161
className={`w-3 h-3 rounded-full ${
62-
i === index ? 'bg-white' : 'bg-white/40'
62+
i === index ? "bg-white" : "bg-white/40"
6363
} transition-all duration-300`}
6464
/>
6565
))}
6666
</div>
6767
</div>
6868
);
69-
}
69+
};

0 commit comments

Comments
 (0)