Skip to content

Commit

Permalink
Merge pull request #11 from lukepistrol/feat/add-github-icon
Browse files Browse the repository at this point in the history
add github symbol
  • Loading branch information
lukepistrol authored Jan 19, 2023
2 parents 6b62ebf + 5066c94 commit bd23623
Show file tree
Hide file tree
Showing 13 changed files with 127 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/CodeEditSymbols/CodeEditSymbols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public extension Image {
static let breakpoint: Image = .init(symbol: "breakpoint")
static let breakpoint_fill: Image = .init(symbol: "breakpoint.fill")
static let customChevronUpChevronDown: Image = .init(symbol: "custom.chevron.up.chevron.down")
static let github: Image = .init(symbol: "github")

// add static properties for your symbols above this line

Expand All @@ -47,6 +48,7 @@ public extension NSImage {
static let breakpoint: NSImage = .symbol(named: "breakpoint")
static let breakpoint_fill: NSImage = .symbol(named: "breakpoint.fill")
static let customChevronUpChevronDown: NSImage = .symbol(named: "custom.chevron.up.chevron.down")
static let github: NSImage = .symbol(named: "github")

// add static properties for your symbols above this line

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"symbols" : [
{
"filename" : "github.svg",
"idiom" : "universal"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ final class CodeEditSymbolsTests: XCTestCase {
assertSnapshot(matching: view, as: .image, record: record)
}

func testCreateNSImageGitHub() {
let image = NSImage.github
let view = NSImageView(image: image)
view.appearance = .init(named: .aqua)
assertSnapshot(matching: view, as: .image, record: record)
}

// MARK: - Image Tests

// MARK: VAULT
Expand Down Expand Up @@ -110,4 +117,11 @@ final class CodeEditSymbolsTests: XCTestCase {
view.appearance = .init(named: .aqua)
assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record)
}

func testCreateImageGitHub() {
let image = Image.github
let view: NSView = NSHostingController(rootView: image).view
view.appearance = .init(named: .aqua)
assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bd23623

Please sign in to comment.