Skip to content

Commit

Permalink
[DOC] DocC를 이용해서 문서를 작성함
Browse files Browse the repository at this point in the history
  • Loading branch information
psychehose committed Jul 26, 2023
1 parent 8811fcc commit 38e79b9
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 28 deletions.
38 changes: 10 additions & 28 deletions HousUIComponent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

**사용법은 적어주면 좋음**

## TextField



## Button

Expand All @@ -16,47 +13,32 @@ ex) ```BasicButton(.kakao)```

1. BasicButton

![BasicButton](./readme_resource/BasicButton.png)
![BasicButton](./Sources/HousUIComponent/HousUIComponent.docc/Resources/BasicButton.png)

2. CheckButton
** Todo 추가/수정의 알림받기, 설정뷰의 생일정보 공개/비공개 체크버튼을 새로 발견했습니다. 빠른 시일 내에 구현해놓을게요

![CheckButton](./readme_resource/CheckButton.png)
![CheckButton](./Sources/HousUIComponent/HousUIComponent.docc/Resources/CheckButton.png)

3. FilterButton

![FilterButton](./readme_resource/FilterButton.png)
![FilterButton](./Sources/HousUIComponent/HousUIComponent.docc/Resources/FilterButton.png)

4. OnboardingButton

![OnboardingButton](./readme_resource/OnboardingButton.png)

## Label

1. HousLabel
* 생성시에 HousFont를 넣어주면 됨. Hous Font의 종류는 Figma에서 확인할 수 있음







------



Test Image



![testImage](./readme_resource/testImage.png)
![OnboardingButton](./Sources/HousUIComponent/HousUIComponent.docc/Resources/OnboardingButton.png)


## TextField
1. RoundedFilledTextField

![RoundedFilledTextField](./Sources/HousUIComponent/HousUIComponent.docc/Resources/RoundedFilledTextField.png)


## Label

1. HousLabel
* 생성시에 HousFont를 넣어주면 됨. Hous Font의 종류는 Figma에서 확인할 수 있음



1 change: 1 addition & 0 deletions HousUIComponent/Sources/HousUIComponent/HousFont.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import AssetKit
import Foundation
import UIKit

/// Hous 폰트 디자인 시스템 - Figma와 제플린에 적혀있습니다.
public enum HousFont {
case H1
case H2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# ``HousUIComponent``

HousUIComponet 문서 (Updated 2023/7/13)

## Overview

HousUICompoent가 어떻게 생겼는 지 파악하기 위해 만들어진 문서입니다. UI컴포넌트를 만들었다면 추가해주세요.
Component 생성시에 스크린샷 첨부하기 사용법을 적어주시면 더욱 좋습니다.

Basic Button

![BasicButton](BasicButton.png)

Check Button

![CheckButton](CheckButton.png)

Filter Button

![FilterButton](FilterButton.png)

Onboarding Button

![Onboarding](OnboardingButton.png)


RoundedTextFieldWithCount

![RoundedFilledTextField](RoundedFilledTextField.png)


## 종류

### Button

- ``BasicButton``
- ``CheckButton``
- ``FilterButton``
- ``OnboardingButton``

### TextField

- ``FilledHousTextField``
- ``HousTextField``
- ``RoundedTextFieldWithCount``

### Label
- ``HousLabel``

### Font
- ``HousFont``
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions HousUIComponent/Sources/HousUIComponent/Label/HousLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import UIKit

import AssetKit

/**
Hous 프로젝트에서 기본적으로 사용하는 Label 클래스
*/
public final class HousLabel: UILabel {

/// Font는 반드시 ``HousFont``를 사용할 것
///
public init(text: String?, font: HousFont, textColor: UIColor) {
super.init(frame: .zero)
setStyle(text: text, font: font, textColor: textColor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import AssetKit
import UIKit

/// 언더라인 텍스트 필드
public final class HousTextField: UITextField {

private let defaultUnderlineLayer = CALayer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import AssetKit
import UIKit

/// 둥근 배경이 채워져있는 글자 제한이 있는 텍스트필드 클래스
public final class RoundedTextFieldWithCount: UITextField {

private struct Constants {
Expand All @@ -28,10 +29,12 @@ public final class RoundedTextFieldWithCount: UITextField {
}
}

/// Read - only prop
public var isValidate: Bool { (text?.count ?? 0) > 0 && (text?.count ?? 0) <= maxCount }

private let maxCount: Int

/// Set MaxCount
public init(
maxCount: Int
) {
Expand Down Expand Up @@ -92,6 +95,8 @@ import RxCocoa

extension Reactive where Base: RoundedTextFieldWithCount {

/// Rx Extension - Control Event라서 Bind 할 수 없음. Bind도 하려면 ControlProperty로 수정해야하는데
/// 그럴만한 이유가 아직 없어서 ControlEvent로 설정
public var isValidate: ControlEvent<Bool> {
let source = base.rx.text
.map { _ in base.isValidate }
Expand Down
Binary file removed HousUIComponent/readme_resource/testImage.png
Binary file not shown.

0 comments on commit 38e79b9

Please sign in to comment.