diff --git a/src/core/components/Calendar/DatePickerCalendar/DatePickerCalendar.stories.tsx b/src/core/components/Calendar/DatePickerCalendar/DatePickerCalendar.stories.tsx index 78aecf8..05b3cd6 100644 --- a/src/core/components/Calendar/DatePickerCalendar/DatePickerCalendar.stories.tsx +++ b/src/core/components/Calendar/DatePickerCalendar/DatePickerCalendar.stories.tsx @@ -23,7 +23,6 @@ export const Default = () => { setPeriodDates(periodDates!); }; - console.log(periodDates); return (
{ const onDateClick = (date: string, value: MarkedDatesItemsProps[]) => { setSelectedDate(date); setMarkedDatesValue(value); - console.log(date); - console.log(value); }; - console.log(selectedDate); - console.log(markedDateValus); + useEffect(() => { + console.log(selectedDate, markedDateValus); + }, [ selectedDate, markedDateValus ]); return (
diff --git a/src/core/components/DatePicker/DatePicker.stories.tsx b/src/core/components/Input/InputDatePicker/InputDatePicker.stories.tsx similarity index 67% rename from src/core/components/DatePicker/DatePicker.stories.tsx rename to src/core/components/Input/InputDatePicker/InputDatePicker.stories.tsx index 69a7024..eba1e3c 100644 --- a/src/core/components/DatePicker/DatePicker.stories.tsx +++ b/src/core/components/Input/InputDatePicker/InputDatePicker.stories.tsx @@ -3,10 +3,9 @@ import { Meta } from "@storybook/react"; import { PeriodDates } from "@/core/components/Calendar/DatePickerCalendar/types/CalendarComponentProps"; import InputDatePicker from "./index"; -import Button from "../Button"; const meta = { - title: "core/InputDatePicker", + title: "core/Input/InputDatePicker", component: InputDatePicker, } satisfies Meta; @@ -15,7 +14,6 @@ export default meta; export const Default = () => { const [ isOpen, setIsOpen ] = useState(false); const [ selectedDate, setSelectedDate ] = useState(""); - const [ isDisabled, setIsDisabled ] = useState(false); const [ periodDates, setPeriodDates ] = useState({ startDate: "", endDate: "", @@ -24,8 +22,6 @@ export const Default = () => { const onDateClick = (date: string, periodDates: PeriodDates) => { setSelectedDate(date); setPeriodDates(periodDates!); - console.log(date); - console.log(periodDates); }; const onCalendarToggle = () => { @@ -36,25 +32,8 @@ export const Default = () => { setIsOpen(false); }; - const onDisabledClick = () => { - setIsDisabled(prev => !prev); - setPeriodDates({ - startDate: "", - endDate: "", - }); - setSelectedDate(""); - }; - return (
-
diff --git a/src/core/components/DatePicker/index.tsx b/src/core/components/Input/InputDatePicker/index.tsx similarity index 92% rename from src/core/components/DatePicker/index.tsx rename to src/core/components/Input/InputDatePicker/index.tsx index d815015..f758af5 100644 --- a/src/core/components/DatePicker/index.tsx +++ b/src/core/components/Input/InputDatePicker/index.tsx @@ -3,11 +3,11 @@ import dayjs from "dayjs"; import clsx from "clsx"; import { CalendarBlank } from "@phosphor-icons/react"; -import DatePickerCalendar from "../Calendar/DatePickerCalendar"; -import Typography from "../Typography"; -import Divider from "../Divider"; -import Button from "../Button"; -import GeneralTab from "../Tab/GeneralTab/GeneralTab"; +import DatePickerCalendar from "../../Calendar/DatePickerCalendar"; +import Typography from "../../Typography"; +import Divider from "../../Divider"; +import Button from "../../Button"; +import GeneralTab from "../../Tab/GeneralTab/GeneralTab"; import { InputDatePickerProps } from "./types"; import useClickOutside from "@/hooks/useClickOutSide"; diff --git a/src/core/components/DatePicker/types/index.ts b/src/core/components/Input/InputDatePicker/types/index.ts similarity index 100% rename from src/core/components/DatePicker/types/index.ts rename to src/core/components/Input/InputDatePicker/types/index.ts diff --git a/src/core/components/Input/InputSelect/InputSelect.stories.tsx b/src/core/components/Input/InputSelect/InputSelect.stories.tsx index e1e2876..1ba6c9c 100644 --- a/src/core/components/Input/InputSelect/InputSelect.stories.tsx +++ b/src/core/components/Input/InputSelect/InputSelect.stories.tsx @@ -30,7 +30,6 @@ export const Default = (props: InputSelectProps) => { const options = data.map(food => ); const onChangeHandler = (e: React.ChangeEvent) => { setCurrentValue(e.target.value); - console.log(currentValue); }; return ( diff --git a/src/index.ts b/src/index.ts index 6af2f20..63819ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ export { default as Button } from "@/core/components/Button"; export { default as BasicCalendar } from "@/core/components/Calendar/BasicCalendar"; export { default as DatePickerCalendar } from "@/core/components/Calendar/DatePickerCalendar"; export { default as ScheduleCalendar } from "@/core/components/Calendar/ScheduleCalendar"; -export { default as InputDatePicker } from "@/core/components/DatePicker"; +export { default as InputDatePicker } from "@/core/components/Input/InputDatePicker"; export { default as Checkbox } from "@/core/components/Checkbox"; export { default as Demo } from "@/core/components/Demo"; export { default as Divider } from "@/core/components/Divider";