Skip to content

Commit

Permalink
Updated the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Berezhnoy committed Feb 1, 2023
1 parent 144e647 commit 0b5551c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Sources/Components/Alignment Tools/Spacers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct Spacers: View {
}
}

/// A stack of Multiple Spacers. Just specify the amount of Spacers you want. Great for creating custom View Layouts.
/// A stack of Multiple Spacers. Just specify the amount of Spacers in a stack. Great for creating custom View Layouts.
public init(_ numberOfSpacers: UInt) {
self.numberOfSpacers = numberOfSpacers
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Components/Buttons/DestructiveButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public struct DestructiveButton: View {

/// Destructive Button is great for destructive actions like deletion, cancelation, etc.
/// To use, just pass in title and put your cancellation action inside the closure.
/// You can also specify in Button Style, Corner Radius, Custom Font and Height for more customization.
/// You can also specify the Button Style, Corner Radius, Custom Font and Height for more customization.
public init(title: String,
style: DestructiveButtonStyle = .plain,
cornerRadius: CGFloat = 10,
Expand Down
3 changes: 2 additions & 1 deletion Sources/Components/Buttons/PlusButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public struct PlusButton: View {
.foregroundColor(.white)
}

/// A Circle-Shaped Plus Button. Specify the color and put your action inside the closure. You can also pass in custom size.
/// A Circle-Shaped Plus Button. To initialize, just put your action inside the closure.
/// You can also pass in custom Size and Color.
public init(color: Color = .blue, size: Double = 55, action: @escaping () -> Void) {
self.size = size
self.color = color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public struct DollarTextField: View {
TextField("$\(placeholder, specifier: "%.2f")",
value: $amount,
format: .currency(code: "USD"))

.multilineTextAlignment(alignment)
.keyboardType(.decimalPad)
.minimumScaleFactor(0.9)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// SimpleSegmentedPicker.swift
// TwitterPicker.swift
//
//
// Created by Daniel Berezhnoy on 1/31/23.
Expand All @@ -8,7 +8,7 @@
import SwiftUI

@available(iOS 15.0, *)
public struct SimpleSegmentedPicker: View {
public struct TwitterPicker: View {

@Binding var selectedIndex: Int

Expand Down Expand Up @@ -105,8 +105,9 @@ public struct SimpleSegmentedPicker: View {
selectedIndex = index
}

/// Customizable Segmented Picker. To initialize, pass in an Array of Strings for all possible choices and a
/// Binding to an Int for the Selected Index. For more customization, pass in Tint Color and Custom Font.
/// Segmented Picker that resembles Twitter's Homepage menu.
/// To initialize, pass in an Array of Strings for all possible choices and a Binding to an Int for the Selected Index.
/// For more customization, pass in Tint Color and Custom Font.
public init(choices: [String],
selectedIndex: Binding<Int>,
tint: Color = .blue,
Expand All @@ -121,8 +122,8 @@ public struct SimpleSegmentedPicker: View {
}

@available(iOS 15.0, *)
struct SimpleSegmentedPicker_Previews: PreviewProvider {
struct TwitterPicker_Previews: PreviewProvider {
static var previews: some View {
SimpleSegmentedPicker(choices: ["Ramen", "Miso", "Pho"], selectedIndex: .constant(0))
TwitterPicker(choices: ["Ramen", "Miso", "Pho"], selectedIndex: .constant(0))
}
}
2 changes: 1 addition & 1 deletion Sources/Components/Progress Views/LoadingSpinner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public struct LoadingSpinner: View {
.tint(color)
}

/// A loading spinner. Change the tint color for more customization.
/// A simple loading spinner. Change the tint color for more customization.
public init(tint: Color = .secondary) {
self.color = tint
}
Expand Down

0 comments on commit 0b5551c

Please sign in to comment.