-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor delete/#55 #57
Conversation
Sign up form/#7
πstorybook: https://65ccb85d5afe55a024495bc0-piugwkavwu.chromatic.com/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reactswipeable-list.css νμΌμ λΌμ΄λΈλ¬λ¦¬μμ μ 곡ν΄μ£Όλ cssμ΄κ³ μ κ° μ‘°κΈ μ»€μ€ν νκΈ° μν΄ distμμ κ°μ Έμ€λ κ² μλ utilsμ νμΌμ μμ±νμ΅λλ€.
κ°νμ΄κ° 컀μ€ν
μ μ§ννμ§λ§ μμ cssνμΌμ΄λΌλ μ μμ utilsλ΄λΆμ μμΉνλ κ²μ΄ μ μ νκ° κ³ λ―Όμ΄ λλλ€. appλ΄μ style ν΄λλ₯Ό μμ±ν΄μ global.css
μ ν¨κ» μμΉμν€λ κ²μ μ΄λ€κ°μ?
|
||
export default function Page() { | ||
return ( | ||
<ContentContainer className="flex"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg:w-[npx]
κ³Ό κ°μ΄ widthκ°μ μ§μ ν΄μ€λ€λ©΄, λ°©μμ΄ λ°μν ꡬνμ΄ λ μ½κ³ UIμ μΌλ‘λ 보기 μ’μ κ² κ°μμ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μΌλ¨ pageμ λν uiλ₯Ό μ§κΈ ν¬κ² μκ°νμ§ μκΈ΄ νλλ°, νΉμ widthλ₯Ό μ§μ μ§μ ν΄μ£Όλ μ΄μ μ λν΄μ μ‘°κΈ λ μ€λͺ
ν΄μ£Όμ€ μ μμκΉμ??
μ λ content containerμμ width 70%λ‘ μ§μ ν΄μ£Όλ κ±Έλ‘ μκ³ μμ΄μμ!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ΄ λΆλΆμ λλ©΄μΌλ‘ λ Όμν΄λ³΄λ©΄ μ’μ κ² κ°μμ
app/(sub-page)/my/page.tsx
Outdated
import ContentContainer from '@/app/ui/view/atom/content-container'; | ||
import React from 'react'; | ||
|
||
export default function Page() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export default function Page() { | |
export default function MyPage() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μμ νμ΅λλ€
16c72c4
@@ -8,7 +8,9 @@ interface LabelContainerProps { | |||
export default function LabelContainer({ label, rightElement }: LabelContainerProps) { | |||
return ( | |||
<div className="flex justify-between items-center w-full"> | |||
<div className="rounded-[100px] bg-light-blue-6 p-2.5 text-white text-lg font-bold">{label}</div> | |||
<div className="rounded-[100px] bg-light-blue-6 p-2.5 text-white lg:text-sm xl:text-base 2xl:text-lg font-semibold"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg:text-sm xl:text-base 2xl:text-lg
λ°μν μμ
νμ€λ, λͺ pxκΉμ§ κ³ λ €νλ νΈμΈκ°μ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breakpointμ λν λ§μ λ§μΌμ€κΉμ?
λμμ΄λκ° μλ€λ κ°μ νμ μ»΄ν¬λνΈ κ΅¬νν΄λ³΄λ©΄μ μ»΄ν¬λνΈλ§λ€ λ€λ₯΄κ² μ μ©νλ κ² κ°μ΅λλ€.
μλ₯Ό λ€μ΄ μ΄λ ν μ»΄ν¬λνΈλ 768px μ΄νμΌλλ κ°μ uiλ₯Ό κ°μ Έκ°λ λ°λ©΄, μ΄λ ν μ»΄ν¬λνΈλ 640px μ΄νμΌλ, 640~768pxμΌ λλ₯Ό λλλ κ² κ°μ΅λλ€
export default function SwipeableCustomList<T extends ListRow>({ data, render }: SwipeableListProps<T>) { | ||
return ( | ||
<div className="rounded-xl border-[1px] border-gray-300 w-full "> | ||
<SwipeableList type={ListType.IOS}>{data.map((item, index) => render(item, index))}</SwipeableList> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyκ°μ΄ λΆμ¬λμ§μμλ€λ warningμ΄ λ¨κ³ μλ€μ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μλ €μ£Όμ
μ κ°μ¬ν©λλ€!
7990bcf
{/* pc */} | ||
<div className="hidden lg:block"> | ||
<Table | ||
headerInfo={headerInfo} | ||
data={customLecture} | ||
data={data} | ||
renderActionButton={(id: number) => <DeleteTakenLectureButton lectureId={id} />} | ||
/> | ||
) : ( | ||
<Table headerInfo={headerInfo} data={data} /> | ||
)} | ||
</div> | ||
{/* mobile */} | ||
<div className="block lg:hidden"> | ||
<Table | ||
headerInfo={headerInfo} | ||
data={data} | ||
swipeable={true} | ||
renderActionButton={(id: number) => <DeleteTakenLectureButton lectureId={id} swipeable={true} />} | ||
/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- CSSμ display:none μμ±μ μ΄μ©ν΄ λ°μνμ ꡬνν νΉλ³ν μ΄μ κ° μλμ?
- μ΄ λ°©μμ μ¬μ©νλ©΄ λͺ¨λ°μΌμμλ 보μ΄μ§ μμ§λ§ PCμ© DOMμ κ³μ κ°μ§κ³ μμ΄μΌ νλ λ¨μ μ΄ μμ΅λλ€.
- ν΄λΉ μ»΄ν¬λνΈκ° μ΄λ―Έ ν΄λΌμ΄μΈνΈ μ»΄ν¬λνΈμ΄λ―λ‘, λ°μν κ΄λ ¨ ν μ λ§λ€μ΄ JSλ‘ λ°μνμ κ΄λ¦¬νλ κ²μ μ΄λ¨κΉμ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useMediaQuery κ°μ κ±Έ λ§λ€μ΄μ λ°μνμΌλ‘ κ΄λ¦¬ν μλ μμ κ² κ°λ€μ!
κ·Έλ¬λ©΄ λ°μν ν μΌλ‘ μΈν΄ μλ² μ»΄ν¬λνΈκ° ν΄λΌμ΄μΈνΈ μ»΄ν¬λνΈλ‘ λ³κ²½λλ κ²½μ°λ μμ κ² κ°μλ°, μ΄κ±°μ λν λΉμ©λ³΄λ€ pcμ© domμ κ°μ§κ³ μλ κ²μ΄ λ ν° λΉμ©μΈμ§ κΆκΈν©λλ€! ( ex λ°μν ν λ΄λΆμμ useState μ¬μ© )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- λλΆλΆμ λ°μν μ μ€μΌμ΄μ€λ tailwindμ Breakpoint prefixλ₯Ό μ¬μ©νμ¬ κ΄λ¦¬ν μ μμ κ² κ°μμ
- κ·Έλ¬λ, νμ¬μ κ°μ΄ λ°μνμΌλ‘ μΈν΄ μ»΄ν¬λνΈλ λ μ΄μμμ΄ λ³νλ κ²½μ°μλ λΆνμν DOM νμ±μ νΌνκΈ° μν΄ λ μ°μν λ°©λ²μ΄ νμνμ§ μμκΉ νλλ° μ μκ°μ λλ€.
- λ§μνμ λλ‘ hookμ μ¬μ©νμ¬ κ΄λ¦¬νλ©΄, ν΄λΉ μ»΄ν¬λνΈκ° λ³ν΄μΌ νλ ν΄λΌμ΄μΈνΈ μ»΄ν¬λνΈ λ¬Έμ κ° λ°μν μ μκ² λ€μ
- μ΄μ λν΄ κ³ λ―Όν΄ λ³΄μλλ°, μ΄μ μ μΈκΈνλ κ΅¬μ± ν¨ν΄μ μ΄μ©νμ¬ λ°μνμ λ΄λΉνλ ν΄λΌμ΄μΈνΈ μ»΄ν¬λνΈλ₯Ό λ§λ€μ΄ μ μΈμ μΌλ‘ μ²λ¦¬ν μ μμ κ² κ°μ΅λλ€.
- μ΄ λ¬Έμ μ λν΄ μ λ λ κ³ λ―Όν΄ λ³΄κ² μ΅λλ€. μΌλ¨ μ΄ PRμ λ³ν©νκ³ , νκ³ μκ°μ λ μμΈν μ΄μΌκΈ°ν΄λ΄ μλ€
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λ΅ μ λ κ³ λ―Ό ν΄λ³΄κ² μ΅λλ€!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[comment]
μ μκ°μλ CSS νμΌμ μ νΈλ³΄λ€λ μ μ νμΌμ΄λ―λ‘ publicμ μμΉνλ κ²μ΄ μ’μ보μ΄λ€μ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[comment]
- μ λ listμ μμ±μ μΆκ°νλ κ²λ³΄λ€ SwipableCustomListλ₯Ό ꡬννλκ² λ μ’μ 보μ΄λ€μ
- μ΄μ λ κΈ°μ‘΄ μ½λλ₯Ό μμ νμ§ μκ³ κΈ°λ₯μ νμ₯νκΈ° λλ¬Έμ OCPλ₯Ό μΆ©μ‘±μν€κΈ° λλ¬Έμ λλ€
πstorybook: https://65ccb85d5afe55a024495bc0-afjyopupij.chromatic.com/ |
πstorybook: https://65ccb85d5afe55a024495bc0-kaaicudact.chromatic.com/ |
@seonghunYang @yougyung
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- νμΈνμ΄μ. μκ³ νμ ¨μ΅λλ€
π μμ λ΄μ©
close #51
λ Έμ μ μ¬λ €λ ux κ°μ λ΄μ©μ κΈ°λ°μΌλ‘ κΈ°μ΄μ κ³Όλͺ© μμ κΈ°λ₯μ 리ν©ν λ§νμ΅λλ€.
λͺ¨λ°μΌ λ²μ ( μ€μμ΄ν ν΄μ μμ ) κ³Ό pc λ²μ ( hover νμ λ μμ ) λ₯Ό λλ€ κ΅¬ννκ³ mockμ λ§λ€μ΄ api μ°κ²°μ νμ§ μμμ΅λλ€
(μ°Έκ³ )
π€ κ³ λ―Ό νλ λΆλΆ
μΈλκ° κ΅¬νν content containerμ paddingμ μμ νμ΅λλ€
Swipeable custom list λ₯Ό ꡬννμ΅λλ€