about summary refs log tree commit diff stats
path: root/attr/attributes.go
diff options
context:
space:
mode:
authorMarkus Wüstenberg2020-11-16 12:58:42 +0100
committerGitHub2020-11-16 12:58:42 +0100
commit108f8d9ba564aef06155f6fdc83e140bb5953b3d (patch)
treeeda8b35771e456d1278e88081f94058bed277a1a /attr/attributes.go
parent794c3b26acbd3931b7973ff7e09a42b0ac414b1c (diff)
downloadgomponents-108f8d9ba564aef06155f6fdc83e140bb5953b3d.tar.lz
gomponents-108f8d9ba564aef06155f6fdc83e140bb5953b3d.tar.zst
gomponents-108f8d9ba564aef06155f6fdc83e140bb5953b3d.zip
Add NodeType which replaces the Placer interface (#45)
The `Placer` interface was a weird interface that tried to abstract away nodes being elements or attributes, but it doesn't really make sense. Now `Nodes` just have a `NodeType`.
Diffstat (limited to 'attr/attributes.go')
-rw-r--r--attr/attributes.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/attr/attributes.go b/attr/attributes.go
index bc157cb..938d762 100644
--- a/attr/attributes.go
+++ b/attr/attributes.go
@@ -26,8 +26,8 @@ func (c Classes) Render(w io.Writer) error {
 	return g.Attr("class", strings.Join(included, " ")).Render(w)
 }
 
-func (c Classes) Place() g.Placement {
-	return g.Inside
+func (c Classes) Type() g.NodeType {
+	return g.AttributeType
 }
 
 // String satisfies fmt.Stringer.