Update md docs of custom components

This commit is contained in:
Insality
2022-03-12 11:54:45 +02:00
parent 102d8ca579
commit 9c2b442c50
6 changed files with 150 additions and 72 deletions

View File

@@ -9,6 +9,7 @@ local SCHEME = {
}
-- Component constructor. Template name and nodes are optional. Pass it if you use it in your component
function Component:init(template, nodes)
self:set_template(template)
self:set_nodes(nodes)
@@ -19,6 +20,7 @@ function Component:init(template, nodes)
end
-- [OPTIONAL] Call on component remove or on druid:final
function Component:on_remove()
end

View File

@@ -10,7 +10,7 @@ local SCHEME = {
}
-- Component constructor
-- Component constructor. Template name and nodes are optional. Pass it if you use it in your component
function Component:init(template, nodes)
-- If your component is gui template, pass the template name and set it
self:set_template(template)