Skip to content

Commit

Permalink
fix: 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 committed Jun 7, 2024
1 parent c9d5c14 commit 08be352
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .eslintcache
Original file line number Diff line number Diff line change
@@ -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","/Users/eugene/github/wow-design-system/packages/wow-icons/src/CloseButton.tsx":"7"},{"size":3427,"mtime":1717049872156,"results":"8","hashOfConfig":"9"},{"size":5010,"mtime":1717580527026,"results":"10","hashOfConfig":"11"},{"size":2033,"mtime":1717580378191,"results":"12","hashOfConfig":"11"},{"size":57,"mtime":1716631427241,"results":"13","hashOfConfig":"9"},{"size":489,"mtime":1717052438980,"results":"14","hashOfConfig":"9"},{"size":423,"mtime":1716631402622,"results":"15","hashOfConfig":"9"},{"size":328,"mtime":1716654901735,"results":"16","hashOfConfig":"9"},{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"8oyd96",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"8a6h2i",{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"32","messages":"33","suppressedMessages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","suppressedMessages":"37","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",["38"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx",["39","40","41"],[],"/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",["42"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts",[],[],"/Users/eugene/github/wow-design-system/packages/wow-icons/src/CloseButton.tsx",[],[],{"ruleId":"43","severity":1,"message":"44","line":3,"column":18,"nodeType":"45","endLine":3,"endColumn":37},{"ruleId":"43","severity":1,"message":"46","line":2,"column":21,"nodeType":"45","endLine":2,"endColumn":41},{"ruleId":"43","severity":1,"message":"47","line":3,"column":24,"nodeType":"45","endLine":3,"endColumn":44},{"ruleId":"48","severity":1,"message":"49","line":27,"column":18,"nodeType":"50","messageId":"51","endLine":27,"endColumn":28},{"ruleId":"43","severity":1,"message":"52","line":1,"column":21,"nodeType":"45","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'."]
[{"/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","/Users/eugene/github/wow-design-system/packages/wow-icons/src/CloseButton.tsx":"7"},{"size":2913,"mtime":1717748077365,"results":"8","hashOfConfig":"9"},{"size":4993,"mtime":1717748373367,"results":"10","hashOfConfig":"9"},{"size":2033,"mtime":1717580378191,"results":"11","hashOfConfig":"9"},{"size":57,"mtime":1716631427241,"results":"12","hashOfConfig":"13"},{"size":489,"mtime":1717052438980,"results":"14","hashOfConfig":"13"},{"size":423,"mtime":1716631402622,"results":"15","hashOfConfig":"13"},{"size":328,"mtime":1716654901735,"results":"16","hashOfConfig":"13"},{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"8a6h2i",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"8oyd96",{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"32","messages":"33","suppressedMessages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","suppressedMessages":"37","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",["38"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/components/Chip/index.tsx",["39","40","41"],[],"/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",["42"],[],"/Users/eugene/github/wow-design-system/packages/wow-ui/src/types/Polymorphic.ts",[],[],"/Users/eugene/github/wow-design-system/packages/wow-icons/src/CloseButton.tsx",[],[],{"ruleId":"43","severity":1,"message":"44","line":3,"column":18,"nodeType":"45","endLine":3,"endColumn":37},{"ruleId":"43","severity":1,"message":"46","line":2,"column":21,"nodeType":"45","endLine":2,"endColumn":41},{"ruleId":"43","severity":1,"message":"47","line":3,"column":24,"nodeType":"45","endLine":3,"endColumn":44},{"ruleId":"48","severity":1,"message":"49","line":27,"column":18,"nodeType":"50","messageId":"51","endLine":27,"endColumn":28},{"ruleId":"43","severity":1,"message":"52","line":1,"column":21,"nodeType":"45","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'."]
17 changes: 0 additions & 17 deletions packages/wow-icons/src/CloseButton.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/wow-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"test": "jest"
},
"devDependencies": {
"wowds-tokens": "workspace:^",
"@chromatic-com/storybook": "^1.3.3",
"@rollup/plugin-typescript": "^11.1.6",
"@storybook/addon-a11y": "^7.5.3",
Expand Down
1 change: 0 additions & 1 deletion packages/wow-ui/src/components/Chip/Chip.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
label: "Chip",
variant: "default",
as: "button",
},
};
Expand Down
26 changes: 12 additions & 14 deletions packages/wow-ui/src/components/Chip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {
/**
* @template T 렌더링할 요소 또는 컴포넌트 타입
*
* @param {T} [as] 렌더링할 요소 또는 컴포넌트. 기본값은 button이며, Chip의 경우 input으로 사용될 수 있음
* @param {T} [element] 렌더링할 요소 또는 컴포넌트. 기본값은 button이며, Chip의 경우 input으로 사용될 수 있음
* @param {boolean} [defaultChecked=false] 칩의 토글의 default 활성화 상태
* @param {boolean} [isChecked=false] 외부에서 제어할 활성 상태.
* @param {string} label 칩 버튼에 들어갈 텍스트
Expand Down Expand Up @@ -50,10 +50,12 @@ const ChipLabel = ({
}) => {
return (
<styled.span
className={chipLabel({ disabled: disabled })}
data-disabled={disabled}
data-selected={isChecked}
textStyle="label2"
className={chipLabel({
type: disabled ? "disabled" : isChecked ? "checked" : "unchecked",
})}
>
{label}
</styled.span>
Expand Down Expand Up @@ -131,22 +133,18 @@ const chipLabel = cva({
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
"&[data-selected=true]": {
color: "white",
},
"&[data-selected=false]": {
color: "mono.950",
},
},
variants: {
disabled: {
true: {
type: {
checked: {
color: "white",
},
unchecked: {
color: "mono.950",
},
disabled: {
color: "darkDisabled",
"&[data-selected=false]": {
color: "darkDisabled",
},
},
false: {},
},
},
});
Expand Down

0 comments on commit 08be352

Please sign in to comment.