Skip to content

Commit 4f57e18

Browse files
authored
[Feat] 인수인계 노트 작성 뷰 퍼블리싱 (#300)
* init: 파일 생성 및 라우터 세팅 * feat: 뷰 퍼블리싱 중 * style: 선택된 tab 스타일 수정 * feat: 페이지 레이아웃 구현 * feat: 커스텀 노트 뷰 구현 * feat: 파일 컴포넌트 분리 * feat: 버튼 클릭시 파일 업로드 구현 * feat: 라디오버튼 생성 * feat: 라디오 그룹 스토리북 생성 * style: 공컴 스타일 수정사항 반영 * style: 커스텀 첫 번째 가이드 타이틀 삭제 * feat: 템플릿 뷰 구현 * chore: 라우터 컴포넌트명 수정 * style: 오른쪽 영역 flex grow 설정 * feat: 활동 태그 필드 추가 * feat: 스크롤바 스타일 적용 * chore: 주석 제거 * fix: function 키워드 제거 * chore: lint에러 해결 * chore: import 절대경로로 수정 * fix: render components using map * chore: input 관련 내용 상수로 분리 * refactor: file upload Logic 훅으로 분리 * fix: modify radiobutton css * chore: 주석 문구 수정 * feat: form submit 핸들러 추가, 각 탭에 전달 * fix: underline -> text button * style: 파일들 flex wrap * chore: 파일 경로 변경 * refactor: NoteDetail 컴포넌트 분리 * docs: 폴더명 대문자 변경 * chore: 줄바꿈 추가 * chore: 라이브러리 업데이트 * chore: 절대 경로로 변경 * fix: 핸들러 함수 useCallback 쓰지 않음 * fix: 파일 여러 개 한 번에 올릴 수 있도록 수정 * feat: wai-aria role 부여 * chore: 타입명 변경 * feat: placeholder 상수 분리 * fix: lint에러 해결
1 parent 23ed69f commit 4f57e18

File tree

38 files changed

+777
-24
lines changed

38 files changed

+777
-24
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@vitejs/plugin-react-swc": "^3.5.0",
5454
"chromatic": "^11.5.4",
5555
"concurrently": "^9.0.1",
56-
"date-fns": "^3.6.0",
56+
"date-fns": "^4.1.0",
5757
"eslint": "^8.57.0",
5858
"eslint-config-prettier": "^9.1.0",
5959
"eslint-import-resolver-typescript": "^3.6.1",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

src/common/component/Button/Button.style.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,15 @@ export const variantStyle = (variant: Required<ButtonProps>['variant']) => {
6363
backgroundColor: theme.colors.gray_100,
6464
},
6565
}),
66-
underline: css({
66+
text: css({
67+
padding: 0,
68+
6769
color: theme.colors.gray_800,
6870
backgroundColor: 'transparent',
6971

72+
fontWeight: 400,
73+
...theme.text.body06,
74+
7075
'&:hover': {
7176
textDecoration: 'underline',
7277
},

src/common/component/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Size } from '@/common/type/design';
55
import { buttonStyle, sizeStyle, variantStyle } from './Button.style';
66

77
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
8-
variant?: 'primary' | 'secondary' | 'tertiary' | 'outline' | 'underline';
8+
variant?: 'primary' | 'secondary' | 'tertiary' | 'outline' | 'text';
99
size?: Extract<Size, 'xLarge' | 'large' | 'medium' | 'small' | 'xSmall'>;
1010
}
1111

src/common/component/CommandButton/CommandButton.style.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { css } from '@emotion/react';
22

33
import { ButtonProps } from '@/common/component/Button/Button';
4+
import { CommandButtonProps } from '@/common/component/CommandButton/CommandButton';
45
import { theme } from '@/common/style/theme/theme';
56

67
export const buttonStyle = (isFrontIcon: boolean) =>
@@ -76,3 +77,21 @@ export const childrenStyle = css({
7677

7778
gap: '0.4rem',
7879
});
80+
81+
export const sizeStyle = (size: Required<CommandButtonProps>['size']) => {
82+
const style = {
83+
/** Button_40 */
84+
large: css({
85+
padding: '1.1rem 1.0rem 1.1rem 1.4rem',
86+
87+
...theme.text.body08,
88+
}),
89+
/** Button_32 */
90+
small: css({
91+
padding: '0.6rem 1.4rem',
92+
93+
...theme.text.body08,
94+
}),
95+
};
96+
return style[size];
97+
};

src/common/component/CommandButton/CommandButton.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ import { SyntheticEvent } from 'react';
22

33
import CommandKey from '@/common/asset/svg/ic_command_key.svg?react';
44
import { ButtonProps } from '@/common/component/Button/Button';
5-
import { sizeStyle, variantStyle } from '@/common/component/Button/Button.style';
5+
import { variantStyle } from '@/common/component/Button/Button.style';
66
import {
77
buttonStyle,
88
childrenStyle,
99
commonStyle,
1010
keyStyle,
11+
sizeStyle,
1112
} from '@/common/component/CommandButton/CommandButton.style';
1213

13-
interface CommandButtonProps extends ButtonProps {
14+
export interface CommandButtonProps extends ButtonProps {
1415
variant?: Extract<ButtonProps['variant'], 'primary' | 'tertiary' | 'outline'>;
1516
size?: Extract<ButtonProps['size'], 'large' | 'small'>;
1617
commandKey: string;
@@ -21,7 +22,7 @@ interface CommandButtonProps extends ButtonProps {
2122

2223
const CommandButton = ({
2324
variant = 'primary',
24-
size = 'large',
25+
size = 'small',
2526
commandKey,
2627
isCommand = true,
2728
isFrontIcon = false,

src/common/component/DatePicker/Trigger/DatePickerTrigger.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { textStyle } from '@/common/component/DatePicker/Trigger/DatePickerTrigg
44
import Flex from '@/common/component/Flex/Flex';
55
import Input from '@/common/component/Input/Input';
66
import Text from '@/common/component/Text/Text';
7+
import { theme } from '@/common/style/theme/theme';
78

89
interface DatePickerTriggerProps {
910
selectedDate: Date | null;
@@ -21,7 +22,7 @@ const DatePickerTrigger = ({ selectedDate, endDate, onClick, width, variant }: D
2122
placeholder="YYYY.MM.DD"
2223
readOnly
2324
onClick={onClick}
24-
css={{ cursor: 'pointer', width }}
25+
css={{ cursor: 'pointer', width, ...theme.text.body08, '::placeholder': { ...theme.text.body08 } }}
2526
/>
2627
{variant === 'range' && (
2728
<>
@@ -33,7 +34,7 @@ const DatePickerTrigger = ({ selectedDate, endDate, onClick, width, variant }: D
3334
placeholder="YYYY.MM.DD"
3435
readOnly
3536
onClick={onClick}
36-
css={{ cursor: 'pointer', width }}
37+
css={{ cursor: 'pointer', width, ...theme.text.body08, '::placeholder': { ...theme.text.body08 } }}
3738
/>
3839
</>
3940
)}

src/common/component/Flex/Flex.style.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ export interface FlexStyle {
4949

5050
width?: string;
5151
height?: string;
52+
maxWidth?: string;
53+
maxHeight?: string;
5254

5355
margin?: string;
5456
marginRight?: string;
@@ -78,6 +80,8 @@ export const getFlexStyle = ({
7880
shrink = 0,
7981
width = '',
8082
height = '',
83+
maxWidth = '',
84+
maxHeight = '',
8185
margin = '0',
8286
marginRight = '',
8387
marginTop = '',
@@ -106,6 +110,8 @@ export const getFlexStyle = ({
106110
gap,
107111
width,
108112
height,
113+
maxWidth,
114+
maxHeight,
109115
margin,
110116
marginRight,
111117
marginLeft,

0 commit comments

Comments
 (0)