mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-25 08:06:51 +00:00
Add nodes with render and transform
This commit is contained in:
11
src/nodes/StringNode.ts
Normal file
11
src/nodes/StringNode.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { AbstractNode, NodeMods } from './AbstractNode'
|
||||
|
||||
export class StringNode extends AbstractNode<string> {
|
||||
constructor(mods?: NodeMods<string>) {
|
||||
super(mods)
|
||||
}
|
||||
|
||||
render(field: string, value: string) {
|
||||
return `<span>${field}</span> <span>${value || ''}</span>`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user