Skip to content

Commit

Permalink
[feat] #157 링크추가에 텍스트 지우기 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ShapeKim98 committed Nov 29, 2024
1 parent 719458d commit d46d052
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public struct ContentSettingFeature {
case 저장_버튼_눌렀을때
case 포킷추가_버튼_눌렀을때
case 링크복사_버튼_눌렀을때

case 링크지우기_버튼_눌렀을때
case 제목지우기_버튼_눌렀을때
case 뒤로가기_버튼_눌렀을때
}

Expand Down Expand Up @@ -218,6 +219,12 @@ private extension ContentSettingFeature {
: .run { _ in await dismiss() }
case .링크복사_버튼_눌렀을때:
return .send(.inner(.링크복사_반영(state.link)))
case .링크지우기_버튼_눌렀을때:
state.domain.data = ""
return .none
case .제목지우기_버튼_눌렀을때:
state.title = ""
return .none
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,31 @@ private extension ContentSettingView {
.pokitBlurReplaceTransition(.pokitDissolve)
}

PokitTextInput(
PokitIconRInput(
text: $store.urlText,
label: "링크",
icon: .icon(.x),
state: $store.linkTextInputState,
label: "링크",
shape: .rectangle,
focusState: $focusedType,
equals: .link
equals: .link,
iconTappedAction: { send(.링크지우기_버튼_눌렀을때) }
)
}
.animation(.pokitSpring, value: store.urlText)
}

var titleTextField: some View {
PokitTextInput(
PokitIconRInput(
text: $store.title,
label: "제목",
icon: .icon(.x),
state: $store.titleTextInpuState,
label: "제목",
shape: .rectangle,
focusState: $focusedType,
equals: .title
) { }
equals: .title,
iconTappedAction: { send(.제목지우기_버튼_눌렀을때) }
)
}

var pokitSelectButton: some View {
Expand Down

0 comments on commit d46d052

Please sign in to comment.