@@ -20,23 +20,38 @@ class BloggingPromptsFeatureDescriptionView: UIView, NibLoadable {
2020private extension BloggingPromptsFeatureDescriptionView {
2121
2222 func configureView( ) {
23- promptCardView. layer. borderWidth = Style . borderWidth
24- promptCardView. layer. cornerRadius = Style . cardCornerRadius
25- promptCardView. layer. borderColor = Style . borderColor
23+ configurePromptCard ( )
24+ configureDescription ( )
25+ configureNote ( )
26+ }
2627
28+ func configurePromptCard( ) {
2729 let promptCard = DashboardPromptsCardCell ( )
2830 promptCard. configureForExampleDisplay ( )
2931 promptCard. translatesAutoresizingMaskIntoConstraints = false
32+
33+ promptCard. layer. borderWidth = Style . borderWidth
34+ promptCard. layer. cornerRadius = Style . cardCornerRadius
35+ promptCard. layer. borderColor = Style . cardBorderColor
36+
37+ promptCard. layer. shadowOffset = Style . cardShadowOffset
38+ promptCard. layer. shadowOpacity = Style . cardShadowOpacity
39+ promptCard. layer. shadowRadius = Style . cardShadowRadius
40+
3041 promptCardView. addSubview ( promptCard)
3142 promptCardView. pinSubviewToSafeArea ( promptCard)
43+ }
3244
45+ func configureDescription( ) {
3346 descriptionLabel. font = Style . labelFont
3447 descriptionLabel. textColor = Style . textColor
3548 descriptionLabel. text = Strings . featureDescription
49+ }
3650
51+ func configureNote( ) {
3752 noteTextView. layer. borderWidth = Style . borderWidth
3853 noteTextView. layer. cornerRadius = Style . noteCornerRadius
39- noteTextView. layer. borderColor = Style . borderColor
54+ noteTextView. layer. borderColor = Style . noteBorderColor
4055 noteTextView. textContainerInset = Style . noteInsets
4156 configureNoteText ( )
4257 }
@@ -69,8 +84,12 @@ private extension BloggingPromptsFeatureDescriptionView {
6984 static let textColor : UIColor = . textSubtle
7085 static let noteInsets = UIEdgeInsets ( top: 12 , left: 12 , bottom: 12 , right: 12 )
7186 static let noteCornerRadius : CGFloat = 6
72- static let cardCornerRadius : CGFloat = 16
87+ static let cardCornerRadius : CGFloat = 10
88+ static let cardShadowRadius : CGFloat = 14
89+ static let cardShadowOpacity : Float = 0.1
90+ static let cardShadowOffset = CGSize ( width: 0 , height: 10.0 )
91+ static let cardBorderColor = UIColor ( red: 0.882 , green: 0.886 , blue: 0.886 , alpha: 1 ) . cgColor
7392 static let borderWidth : CGFloat = 1
74- static let borderColor = UIColor . textQuaternary. cgColor
93+ static let noteBorderColor = UIColor . textQuaternary. cgColor
7594 }
7695}
0 commit comments