feat: Initial commit
This commit is contained in:
20
Sources/CliDoc/Nodes/ShellCommand.swift
Normal file
20
Sources/CliDoc/Nodes/ShellCommand.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
public struct ShellCommand<Content: Node>: Node {
|
||||
|
||||
public var symbol: String
|
||||
public var content: Content
|
||||
|
||||
public init(
|
||||
symbol: String = "$",
|
||||
@NodeBuilder content: () -> Content
|
||||
) {
|
||||
self.symbol = symbol
|
||||
self.content = content()
|
||||
}
|
||||
|
||||
public var body: some Node {
|
||||
Group(separator: " ") {
|
||||
symbol
|
||||
content
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user