-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Box 컴포넌트의 text 스펙을 수정해요. (#63)
* feature: Box 컴포넌트 기본 세팅 * feature: RightIcon 추가 * feature: storybook세팅 * fix: RightArrow 절대경로 수정 * fix: 파이프라인 이름 수정 * fix: panda config 수정 * fix: turbo 버전 조정 * fix: 상태관리 설정 * fix: 스토리북 수정 * fix: 스토리북 에러 수정 * fix: storybook 문서화 추가 * fix: 제네릭을 이용한 타입 정의 * fix: p5 코드리뷰 * fix: 제네릭 타입 깔끔하게 수정 * fix: 코드리뷰 반영 * fix: 터보레포 버전 변경 * fix: 파이프라인 수정 * fix: box props 네이밍 변경 * feature: Box 컴포넌트 스펙 수정 * feature: Warn Icon 추가 * fix: useCheckedState훅 두개로 분리 * fix: 개별 props 반영 * fix: 개별 workflow 수정 * fix: workflow 수정 * fix: workflow에 설치명 정확히 입력 * fix: 명령어 간단화 * fix: 워크플로우 수정 * fix: firefox 버전 확인 * fix: 이것저것 시도하기 * fix : 워크플로우 수정 * chore: playwright 패키지 설치 * chore: Devdependency로 변경 * fix: 코드리뷰 반영 * fix: 배럴 파일 제거 * fix: 경로 수정 * chore: playwright/test 패키지 설치 * fix: 찐 코드리뷰 마무리
- Loading branch information
Showing
13 changed files
with
255 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { forwardRef } from "react"; | ||
import { color } from "wowds-tokens"; | ||
|
||
import type { IconProps } from "@/types/Icon.ts"; | ||
|
||
const Warn = forwardRef<SVGSVGElement, IconProps>( | ||
( | ||
{ | ||
className, | ||
width = "24", | ||
height = "25", | ||
viewBox = "0 0 24 25", | ||
stroke = "white", | ||
fill = "white", | ||
...rest | ||
}, | ||
ref | ||
) => { | ||
return ( | ||
<svg | ||
aria-label="warn icon" | ||
className={className} | ||
fill="none" | ||
height={height} | ||
ref={ref} | ||
viewBox={viewBox} | ||
width={width} | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...rest} | ||
> | ||
<path | ||
d="M21.3 12.5C21.3 17.6362 17.1362 21.8 12 21.8C6.86375 21.8 2.7 17.6362 2.7 12.5C2.7 7.36375 6.86375 3.2 12 3.2C17.1362 3.2 21.3 7.36375 21.3 12.5Z" | ||
stroke={color[stroke]} | ||
strokeWidth="1.4" | ||
/> | ||
<path | ||
d="M12.766 6.81606L12.6566 14.9411H11.3441L11.2348 6.81606H12.766ZM12.0004 18.2223C11.4535 18.2223 10.9848 17.7692 11.0004 17.2067C10.9848 16.6598 11.4535 16.2067 12.0004 16.2067C12.5473 16.2067 13.0004 16.6598 13.0004 17.2067C13.0004 17.7692 12.5473 18.2223 12.0004 18.2223Z" | ||
fill={color[fill]} | ||
/> | ||
</svg> | ||
); | ||
} | ||
); | ||
|
||
Warn.displayName = "Warn"; | ||
export default Warn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { default as Check } from "./Check.tsx"; | ||
export { default as DownArrow } from "./DownArrow.tsx"; | ||
export { default as RightArrow } from "./RightArrow.tsx"; | ||
export { default as Warn } from "./Warn.tsx"; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { Flex, styled } from "@styled-system/jsx"; | ||
import { useState } from "react"; | ||
|
||
import Box from "@/components/Box"; | ||
|
@@ -26,8 +27,8 @@ const meta = { | |
}, | ||
variant: { | ||
description: "박스의 타입을 설정합니다.", | ||
mapping: ["text", "checkbox", "arrow"], | ||
options: ["text", "checkbox", "arrow"], | ||
mapping: ["text", "checkbox", "arrow", "warn"], | ||
options: ["text", "checkbox", "arrow", "warn"], | ||
control: { | ||
type: "select", | ||
labels: { | ||
|
@@ -40,8 +41,7 @@ const meta = { | |
text: { | ||
description: "박스에 메인으로 표기할 텍스트를 입력합니다.", | ||
table: { | ||
type: { summary: "string" }, | ||
defaultValue: { summary: "" }, | ||
type: { summary: "ReactNode" }, | ||
}, | ||
control: { | ||
type: "text", | ||
|
@@ -201,6 +201,48 @@ export const LeftElementBox: Story = { | |
}, | ||
}; | ||
|
||
export const WarnBox: Story = { | ||
args: { | ||
text: "2024년 1학기 1차 정회원 지원 중이에요.", | ||
subText: "정회원 가입 조건을 완료해주세요.", | ||
status: "error", | ||
variant: "warn", | ||
}, | ||
}; | ||
|
||
export const TextReactElementBox: Story = { | ||
args: { | ||
text: ( | ||
<Flex direction="column" gap="sm"> | ||
<Flex align="center" direction="row" gap="xs"> | ||
<styled.span color="GrayText" textStyle="h3"> | ||
학번 | ||
</styled.span> | ||
<styled.span color="textBlack">C000000</styled.span> | ||
</Flex> | ||
<Flex align="center" direction="row" gap="xs"> | ||
<styled.span color="GrayText" textStyle="h3"> | ||
학과 | ||
</styled.span> | ||
<styled.span color="textBlack">컴퓨터공학과</styled.span> | ||
</Flex> | ||
<Flex align="center" direction="row" gap="xs"> | ||
<styled.span color="GrayText" textStyle="h3"> | ||
전화번호 | ||
</styled.span> | ||
<styled.span color="textBlack">01000000000</styled.span> | ||
</Flex> | ||
<Flex align="center" direction="row" gap="xs"> | ||
<styled.span color="GrayText" textStyle="h3"> | ||
이메일 | ||
</styled.span> | ||
<styled.span color="textBlack">[email protected]</styled.span> | ||
</Flex> | ||
</Flex> | ||
), | ||
}, | ||
}; | ||
|
||
const ControlledBox = () => { | ||
const [checked, setChecked] = useState(false); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.