diff --git a/.eslintcache b/.eslintcache index 41662bb2..7575fcfa 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/Chip.stories.ts":"1","/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx":"2","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/button.ts":"3","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/index.ts":"4","/Users/eugene/github/wow-design-system/apps/wow-docs/app/page.tsx":"5","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts":"6"},{"size":2889,"mtime":1717749264030,"results":"7","hashOfConfig":"8"},{"size":4944,"mtime":1717749282498,"results":"9","hashOfConfig":"8"},{"size":2033,"mtime":1717580378191,"results":"10","hashOfConfig":"8"},{"size":57,"mtime":1716631427241,"results":"11","hashOfConfig":"12"},{"size":489,"mtime":1717052438980,"results":"13","hashOfConfig":"12"},{"size":423,"mtime":1716631402622,"results":"14","hashOfConfig":"12"},{"filePath":"15","messages":"16","suppressedMessages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"8a6h2i",{"filePath":"18","messages":"19","suppressedMessages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"8oyd96",{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/Chip.stories.ts",["33"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx",["34","35","36"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/button.ts",[],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/index.ts",[],[],"/Users/eugene/github/wow-design-system/apps/wow-docs/app/page.tsx",["37"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts",[],[],{"ruleId":"38","severity":1,"message":"39","line":3,"column":18,"nodeType":"40","endLine":3,"endColumn":37},{"ruleId":"38","severity":1,"message":"41","line":2,"column":21,"nodeType":"40","endLine":2,"endColumn":41},{"ruleId":"38","severity":1,"message":"42","line":3,"column":24,"nodeType":"40","endLine":3,"endColumn":44},{"ruleId":"43","severity":1,"message":"44","line":27,"column":18,"nodeType":"45","messageId":"46","endLine":27,"endColumn":28},{"ruleId":"38","severity":1,"message":"47","line":1,"column":21,"nodeType":"40","endLine":1,"endColumn":45},"import/no-unresolved","Unable to resolve path to module '@/components/Chip'.","Literal","Unable to resolve path to module '@styled-system/css'.","Unable to resolve path to module '@styled-system/jsx'.","@typescript-eslint/naming-convention","Interface name `_ChipProps` must match one of the following formats: PascalCase","Identifier","doesNotMatchFormat","Unable to resolve path to module '@styled-system/css/css'."] \ No newline at end of file +[{"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/Chip.stories.ts":"1","/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx":"2","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/button.ts":"3","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/index.ts":"4","/Users/eugene/github/wow-design-system/apps/wow-docs/app/page.tsx":"5","/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts":"6"},{"size":2925,"mtime":1717750128796,"results":"7","hashOfConfig":"8"},{"size":5000,"mtime":1717766454958,"results":"9","hashOfConfig":"8"},{"size":2068,"mtime":1717764840794,"results":"10","hashOfConfig":"8"},{"size":57,"mtime":1716631427241,"results":"11","hashOfConfig":"12"},{"size":489,"mtime":1717052438980,"results":"13","hashOfConfig":"12"},{"size":423,"mtime":1716631402622,"results":"14","hashOfConfig":"12"},{"filePath":"15","messages":"16","suppressedMessages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"8a6h2i",{"filePath":"18","messages":"19","suppressedMessages":"20","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"8oyd96",{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/Chip.stories.ts",["33"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx",["34","35","36"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/button.ts",[],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/index.ts",[],[],"/Users/eugene/github/wow-design-system/apps/wow-docs/app/page.tsx",["37"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts",[],[],{"ruleId":"38","severity":1,"message":"39","line":3,"column":18,"nodeType":"40","endLine":3,"endColumn":37},{"ruleId":"38","severity":1,"message":"41","line":2,"column":21,"nodeType":"40","endLine":2,"endColumn":41},{"ruleId":"38","severity":1,"message":"42","line":3,"column":24,"nodeType":"40","endLine":3,"endColumn":44},{"ruleId":"43","severity":1,"message":"44","line":28,"column":18,"nodeType":"45","messageId":"46","endLine":28,"endColumn":28},{"ruleId":"38","severity":1,"message":"47","line":1,"column":21,"nodeType":"40","endLine":1,"endColumn":45},"import/no-unresolved","Unable to resolve path to module '@/components/Chip'.","Literal","Unable to resolve path to module '@styled-system/css'.","Unable to resolve path to module '@styled-system/jsx'.","@typescript-eslint/naming-convention","Interface name `_ChipProps` must match one of the following formats: PascalCase","Identifier","doesNotMatchFormat","Unable to resolve path to module '@styled-system/css/css'."] \ No newline at end of file diff --git a/packages/wow-ui/src/components/Chip/Chip.stories.ts b/packages/wow-ui/src/components/Chip/Chip.stories.ts index 56c65e5f..6a6756d2 100644 --- a/packages/wow-ui/src/components/Chip/Chip.stories.ts +++ b/packages/wow-ui/src/components/Chip/Chip.stories.ts @@ -103,7 +103,7 @@ type Story = StoryObj; export const Default: Story = { args: { label: "Chip", - element: "button", + as: "button", clickable: true, }, }; @@ -112,7 +112,7 @@ export const DivChip: Story = { args: { label: "Chip", clickable: false, - element: "div", + as: "div", }, }; export const DisabledChip: Story = { @@ -120,7 +120,7 @@ export const DisabledChip: Story = { label: "Chip", clickable: true, disabled: true, - element: "button", + as: "button", }, }; diff --git a/packages/wow-ui/src/components/Chip/index.tsx b/packages/wow-ui/src/components/Chip/index.tsx index 830bb353..02df55f4 100644 --- a/packages/wow-ui/src/components/Chip/index.tsx +++ b/packages/wow-ui/src/components/Chip/index.tsx @@ -5,6 +5,7 @@ import type { ReactNode } from "react"; import { forwardRef, useEffect, useState } from "react"; import type { + AsProps, ButtonElementType, PolymorphicComponentProps, PolymorphicRef, diff --git a/packages/wow-ui/src/types/button.ts b/packages/wow-ui/src/types/button.ts index 3915f590..a5d71572 100644 --- a/packages/wow-ui/src/types/button.ts +++ b/packages/wow-ui/src/types/button.ts @@ -5,7 +5,6 @@ export type ButtonElementType = Extract; // 버튼의 주요한 HTML Attributes를 미리 정의한 ButtonProps 타입입니다. [https://www.w3schools.com/tags/tag_button.asp] export interface BasicButtonProps { - element?: ButtonElementType; /** * 버튼의 ID를 지정합니다. */