Skip to content

Commit

Permalink
add previews in Playground Book View
Browse files Browse the repository at this point in the history
minor changes
  • Loading branch information
miguelangel-dev committed Dec 11, 2019
1 parent 46d004f commit 017a3c9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Support Files/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"copyright" = "Copyright © 2019 The nef authors";
"github" = "Read more about nef on GitHub";
"install_preferences" = "Open 'System Preferences'";
"install_extensions" = "Select 'Extension'";
"install_extensions" = "Select 'Extensions'";
"nef_extension" = "Xcode Source Editor";

// MARK: - Preferences
Expand Down
23 changes: 23 additions & 0 deletions nef/PlaygroundBook/PlaygroundBookView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,26 @@ struct PlaygroundBookView: View {
static let nef = Image("nef-favicon")
}
}


// MARK: - previews
#if DEBUG
import nef
import BowEffects

struct PlaygroundBookView_Previews: PreviewProvider {
static let console = PlaygroundBookConsole()

static var previews: some View {
console.historical = "✓ It is a preview 1\n✓ It is a preview 2"
console.task = "Preview"
console.details = "Preview details"
console.totalSteps = 5
console.currentStep = 2
console.duration = .seconds(15)
console.status = .running

return PlaygroundBookView(console: console).frame(width: 800, height: 200, alignment: .center)
}
}
#endif

0 comments on commit 017a3c9

Please # to comment.