Skip to content
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(DesignSystem): public event를 extension으로 옮기기 #7

Open
dodo849 opened this issue Jul 24, 2024 · 0 comments
Open
Labels
🔨 Refactor This task focuses on code refactoring.

Comments

@dodo849
Copy link
Member

dodo849 commented Jul 24, 2024

🔄 Reason for Refactoring

public event(public interface)에 대한 명확한 분리

♻️ Refactoring Plans

모든 컴포넌트에 대해 아래와 같이 구성

public extension BaseCalendar {
    var onChangeSelectedDate: Observable<Date> {
        return _onChangeSelectedDate.asObservable()
    }
    
    var selectedDate: Binder<Date> {
        return Binder(self) { [weak self] calendar, date in
            guard let self = self else { return }
            
            self.selectedDay = self.days.first { $0.date == date }
            self.updateSelectedDay()
        }
    }
}

public class BaseCalendar: UIView {
    // MARK: Event
    private let _onChangeSelectedDate = PublishSubject<Date>()
    ```

## 📚 Remarks

- x
@dodo849 dodo849 added the 🔨 Refactor This task focuses on code refactoring. label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 Refactor This task focuses on code refactoring.
Projects
None yet
Development

No branches or pull requests

1 participant