Skip to content

Commit

Permalink
feat(feature): make description optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mlbonniec committed May 6, 2024
1 parent 1ef6a63 commit 41896a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Sources/OnBoardingKit/Components/OnBoardingFeatureView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
struct OnBoardingFeatureView: View {
var image: Image?
var label: Text?
var description: Text
var description: Text?

var body: some View {
HStack(spacing: Constants.Spacings.small) {
Expand All @@ -24,7 +24,7 @@ struct OnBoardingFeatureView: View {
label?
.fontWeight(.semibold)

description
description?
.foregroundStyle(.gray)
}
.font(.system(size: 16))
Expand Down
4 changes: 2 additions & 2 deletions Sources/OnBoardingKit/Models/OnBoardingModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ extension OnBoardingKit {

public var label: Text?

public var description: Text
public var description: Text?

public init(image: Image? = nil, label: Text? = nil, description: Text) {
public init(image: Image? = nil, label: Text? = nil, description: Text?) {
self.image = image
self.label = label
self.description = description
Expand Down

0 comments on commit 41896a8

Please sign in to comment.