diff --git a/package.json b/package.json index 3b121d9..947c760 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bbodek-ui", - "version": "0.0.216", + "version": "0.0.217", "type": "module", "author": "Bbodek", "license": "MIT", diff --git a/src/core/components/Button/ButtonIcon/ButtonIcon.stories.tsx b/src/core/components/Button/IconButton/IconButton.stories.tsx similarity index 86% rename from src/core/components/Button/ButtonIcon/ButtonIcon.stories.tsx rename to src/core/components/Button/IconButton/IconButton.stories.tsx index 0af0f46..ae4b9e4 100644 --- a/src/core/components/Button/ButtonIcon/ButtonIcon.stories.tsx +++ b/src/core/components/Button/IconButton/IconButton.stories.tsx @@ -3,12 +3,12 @@ import { Meta } from "@storybook/react"; import { TypographyOptions } from "@/constants"; import { ColorOptions } from "@/constants/color"; import { ROUNDED, SIZE } from "../ButtonBase/constants"; -import { default as ButtonIcon } from "./index"; -import { ButtonIconProps } from "./types"; +import { default as IconButton } from "./index"; +import { IconButtonProps } from "./types"; const meta = { - title: "core/Button/ButtonIcon", - component: ButtonIcon, + title: "core/Button/IconButton", + component: IconButton, argTypes: { theme: { control: "select", @@ -51,15 +51,15 @@ const meta = { description: "Button With disabled", }, }, -} satisfies Meta; +} satisfies Meta; export default meta; -export const Default = (props: ButtonIconProps) => { +export const Default = (props: IconButtonProps) => { const { theme, color, backgroundColor, size, icon, ...rest } = props; return ( - , ) => { const { rounded, size, className, ...rest } = props; @@ -21,4 +21,4 @@ const ButtonIcon = forwardRef(({ ); }); -export default ButtonIcon; +export default IconButton; diff --git a/src/core/components/Button/ButtonIcon/types/index.ts b/src/core/components/Button/IconButton/types/index.ts similarity index 66% rename from src/core/components/Button/ButtonIcon/types/index.ts rename to src/core/components/Button/IconButton/types/index.ts index 169ec25..07ec5ce 100644 --- a/src/core/components/Button/ButtonIcon/types/index.ts +++ b/src/core/components/Button/IconButton/types/index.ts @@ -1,6 +1,6 @@ import { ButtonBaseProps } from "../../ButtonBase/types"; -export interface ButtonIconProps extends Omit { +export interface IconButtonProps extends Omit { icon: React.ReactNode; isCircle?: boolean; } diff --git a/src/index.ts b/src/index.ts index 7044b82..7396fc0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ export { default as BottomSheet } from "@/core/components/BottomSheet"; export { default as Button } from "@/core/components/Button/Button"; -export { default as ButtonIcon } from "@/core/components/Button/ButtonIcon"; +export { default as IconButton } from "@/core/components/Button/IconButton"; 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";