added samples
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
327975d99d
commit
ff6182db75
@ -90,3 +90,19 @@ class BreadcrumbsViewController: BaseViewController<Breadcrumbs> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension BreadcrumbsViewController: ComponentSampleable {
|
||||||
|
static func makeSample() -> ComponentSample {
|
||||||
|
let component = Self.makeComponent()
|
||||||
|
component.breadcrumbModels = [
|
||||||
|
.init(text: "Home"),
|
||||||
|
.init(text: "Support", enabeled: false),
|
||||||
|
.init(text: "Service & Apps"),
|
||||||
|
.init(text: "My Verizon"),
|
||||||
|
.init(text: "Bill"),
|
||||||
|
.init(text: "Mobile Billing & Payments"),
|
||||||
|
.init(text: "Billing statement FAQs", selected: true)
|
||||||
|
]
|
||||||
|
return ComponentSample(component: component)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -262,6 +262,9 @@ extension ButtonIconViewController: ComponentSampleable {
|
|||||||
static func makeSample() -> ComponentSample {
|
static func makeSample() -> ComponentSample {
|
||||||
let component = Self.makeComponent()
|
let component = Self.makeComponent()
|
||||||
component.iconName = .addToFavorite
|
component.iconName = .addToFavorite
|
||||||
|
component.selectedIconName = .addedToFavorite
|
||||||
|
component.selectable = true
|
||||||
|
component.onChange = { c in print("changed: \(c.isSelected)") }
|
||||||
component.size = .large
|
component.size = .large
|
||||||
return ComponentSample(component: component, trailingPinningType: .lessThanOrEqual)
|
return ComponentSample(component: component, trailingPinningType: .lessThanOrEqual)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,3 +119,12 @@ class CarouselScrollbarViewConttroller: BaseViewController<CarouselScrollbar> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extension CarouselScrollbarViewConttroller: ComponentSampleable {
|
||||||
|
static func makeSample() -> ComponentSample {
|
||||||
|
let component = Self.makeComponent()
|
||||||
|
component.numberOfSlides = 4
|
||||||
|
return ComponentSample(component: component)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -431,3 +431,29 @@ public class ShadowView: View {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension ViewProtocol where Self: UIView {
|
||||||
|
private func createShadowLayer() -> CALayer {
|
||||||
|
let shadowLayer = CALayer()
|
||||||
|
shadowLayer.backgroundColor = UIColor.clear.cgColor
|
||||||
|
shadowLayer.frame = bounds
|
||||||
|
return shadowLayer
|
||||||
|
}
|
||||||
|
|
||||||
|
func addCustomShadow(config: DropShadowConfiguration) {
|
||||||
|
let shadowLayer = createShadowLayer()
|
||||||
|
// shadowLayer.shadowColor = config.shadowColorConfiguration.getColor(self).cgColor
|
||||||
|
// shadowLayer.shadowOpacity = config.shadowOpacityConfiguration.value(for: self)
|
||||||
|
// shadowLayer.shadowOffset = offset
|
||||||
|
// shadowLayer.shadowRadius = radius
|
||||||
|
layer.insertSublayer(shadowLayer, at: 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
func removeAllCustomShadows() {
|
||||||
|
layer.sublayers?.forEach { sublayer in
|
||||||
|
if sublayer.shadowOpacity > 0 && sublayer.backgroundColor == UIColor.clear.cgColor {
|
||||||
|
sublayer.removeFromSuperlayer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -186,3 +186,22 @@ class DropdownSelectViewController: BaseViewController<DropdownSelect> {
|
|||||||
content: content) : nil
|
content: content) : nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension DropdownSelectViewController: ComponentSampleable {
|
||||||
|
static func makeSample() -> ComponentSample {
|
||||||
|
let component = Self.makeComponent()
|
||||||
|
component.labelText = "Street Address"
|
||||||
|
component.helperText = "For example: 123 Verizon St"
|
||||||
|
component.errorText = "Enter a valid address."
|
||||||
|
component.tooltipModel = .init(title: "Check the formatting of your address", content:"House/Building number then street name")
|
||||||
|
component.options = [
|
||||||
|
.init(text: "Alabama"),
|
||||||
|
.init(text: "Alaska"),
|
||||||
|
.init(text: "Arizona"),
|
||||||
|
.init(text: "Arkansas")
|
||||||
|
]
|
||||||
|
return ComponentSample(component: component)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -46,3 +46,11 @@ final class PaginationViewController: BaseViewController<Pagination> {
|
|||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension PaginationViewController: ComponentSampleable {
|
||||||
|
static func makeSample() -> ComponentSample {
|
||||||
|
let component = Self.makeComponent()
|
||||||
|
component.total = 10
|
||||||
|
return ComponentSample(component: component)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user