File tree Expand file tree Collapse file tree
src/Projects/BKPresentation/Sources/MainFlow/Note/View Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Copyright © 2025 Booket. All rights reserved
2+
3+ import BKDesign
4+ import SnapKit
5+ import UIKit
6+
7+ final class BadgeView : UIView {
8+ private let label = BKLabel (
9+ fontStyle: . caption1( weight: . medium) ,
10+ color: . bkContentColor( . brand) ,
11+ alignment: . center
12+ )
13+
14+ public var title : String {
15+ didSet {
16+ label. setText ( text: title)
17+ }
18+ }
19+
20+ public init ( title: String ) {
21+ self . title = title
22+ super. init ( frame: . zero)
23+
24+ setupUI ( )
25+ setupLayout ( )
26+ }
27+
28+ required init ? ( coder: NSCoder ) {
29+ fatalError ( " init(coder:) has not been implemented " )
30+ }
31+
32+ private func setupUI( ) {
33+ self . backgroundColor = . bkBackgroundColor( . tertiary)
34+ self . layer. cornerRadius = BKRadius . xsmall
35+ label. setText ( text: title)
36+ }
37+
38+ private func setupLayout( ) {
39+ addSubview ( label)
40+
41+ label. snp. makeConstraints {
42+ $0. leading. trailing. equalToSuperview ( ) . inset ( BKSpacing . spacing2)
43+ $0. top. bottom. equalToSuperview ( ) . inset ( BKSpacing . spacing05)
44+ }
45+ }
46+ }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import BKDesign
44import UIKit
55import SnapKit
66
7+ // 2차 작업 때, BKDesign component로 빼기
78final class TooltipView : BaseView {
89 private let textLabel = BKLabel (
910 text: " 예시 문장을 알려드려요 " ,
You can’t perform that action at this time.
0 commit comments