Skip to content

Commit

Permalink
Adapted README and examples to new initializer syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronshemilt committed Mar 22, 2021
1 parent bb7addd commit 9dd1d64
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ You can additionally style the toolbar (size, color, padding etc.) via a `Keyboa
import KeyboardToolbar

let toolbarItems: [KeyboardToolbarItem] = [
.init("bold", callback: {}),
.init("italic", callback: {}),
.init("underline", callback: {}),
.init(systemName: "bold", callback: {}),
.init(systemName: "italic", callback: {}),
.init(systemName: "underline", callback: {}),
.dismissKeyboard
]

Expand Down
6 changes: 3 additions & 3 deletions Tests/ExampleViews/ExampleViewOne.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import KeyboardToolbar

struct ExampleViewOne: View {
let toolbarItems: [KeyboardToolbarItem] = [
.init("bold", callback: {}),
.init("italic", callback: {}),
.init("underline", callback: {}),
.init(systemName: "bold", callback: {}),
.init(systemName: "italic", callback: {}),
.init(systemName: "underline", callback: {}),
.dismissKeyboard
]

Expand Down
6 changes: 3 additions & 3 deletions Tests/ExampleViews/ExampleViewThree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ struct ExampleViewThree: View {

func textField2Changed(_ val: Bool) {
toolbarItems = [
.init("bold", callback: {}),
.init("italic", callback: {}),
.init("underline", callback: {}),
.init(systemName: "bold", callback: {}),
.init(systemName: "italic", callback: {}),
.init(systemName: "underline", callback: {}),
.dismissKeyboard
]
}
Expand Down
6 changes: 3 additions & 3 deletions Tests/ExampleViews/ExampleViewTwo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import KeyboardToolbar

struct ExampleViewTwo: View {
let toolbarItems: [KeyboardToolbarItem] = [
.init("bold", color: .white, callback: {}),
.init("italic", color: .white, callback: {}),
.init("underline", color: .white, callback: {}),
.init(systemName: "bold", color: .white, callback: {}),
.init(systemName: "italic", color: .white, callback: {}),
.init(systemName: "underline", color: .white, callback: {}),
.dismissKeyboard
]

Expand Down

0 comments on commit 9dd1d64

Please sign in to comment.