-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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에러 해결
- Loading branch information
Showing
38 changed files
with
777 additions
and
24 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 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,36 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { theme } from '@/common/style/theme/theme'; | ||
|
||
export const radioButtonLayoutStyle = css({ | ||
display: 'flex', | ||
|
||
gap: '0.4rem', | ||
|
||
cursor: 'pointer', | ||
}); | ||
|
||
export const inputStyle = css({ | ||
'& + label': { | ||
cursor: 'pointer', | ||
transition: '0.2s ease-in-out', | ||
|
||
...theme.text.body06, | ||
}, | ||
|
||
accentColor: theme.colors.key_500, | ||
|
||
cursor: 'pointer', | ||
}); | ||
|
||
export const labelStyle = css({ | ||
color: theme.colors.black, | ||
|
||
whiteSpace: 'nowrap', | ||
}); | ||
|
||
export const radioGroupStyle = css({ | ||
display: 'flex', | ||
|
||
gap: '0.8rem', | ||
}); |
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,22 @@ | ||
import { InputHTMLAttributes } from 'react'; | ||
|
||
import { inputStyle, labelStyle, radioButtonLayoutStyle } from './RadioButton.style'; | ||
|
||
export interface RadioButtonProps extends InputHTMLAttributes<HTMLInputElement> { | ||
label: string; | ||
name: string; | ||
checked: boolean; | ||
} | ||
|
||
const RadioButton = ({ label, value, id, checked, ...props }: RadioButtonProps) => { | ||
return ( | ||
<div role="radio" aria-label="radio-button" aria-checked={checked} tabIndex={0} css={radioButtonLayoutStyle}> | ||
<input id={id} type="radio" value={value} css={inputStyle} {...props} /> | ||
<label htmlFor={id} css={labelStyle}> | ||
{label} | ||
</label> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RadioButton; |
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,49 @@ | ||
import { ChangeEvent } from 'react'; | ||
|
||
import RadioButton from '@/common/component/RadioButton/RadioButton'; | ||
import { radioGroupStyle } from '@/common/component/RadioButton/RadioButton.style'; | ||
|
||
export interface RadioProps { | ||
label: string; | ||
name: string; | ||
value: string; | ||
} | ||
|
||
interface RadioButtonGroupProps { | ||
options: RadioProps[]; | ||
onChange: (e: ChangeEvent<HTMLInputElement>) => void; | ||
value: string; | ||
} | ||
|
||
const RadioGroup = ({ options, onChange, value }: RadioButtonGroupProps) => { | ||
const handleChange = (e: ChangeEvent<HTMLInputElement>) => { | ||
const selectedValue = e.target.value; | ||
onChange({ target: { value: selectedValue } } as ChangeEvent<HTMLInputElement>); | ||
}; | ||
|
||
const renderRadioButton = () => { | ||
return options.map(({ label, value: optionValue, name }, index) => { | ||
const id = `${name}-${index}`; | ||
|
||
return ( | ||
<RadioButton | ||
key={id} | ||
id={id} | ||
label={label} | ||
name={name} | ||
value={optionValue} | ||
onChange={handleChange} | ||
checked={value === optionValue} | ||
/> | ||
); | ||
}); | ||
}; | ||
|
||
return ( | ||
<div role="radiogroup" css={radioGroupStyle}> | ||
{renderRadioButton()} | ||
</div> | ||
); | ||
}; | ||
|
||
export default RadioGroup; |
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 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
Oops, something went wrong.