Remove register and update examples

This commit is contained in:
Insality
2024-11-21 00:28:53 +02:00
parent 4ef65579a6
commit bc0ada7098
44 changed files with 78 additions and 668 deletions

View File

@@ -1,5 +1,4 @@
local component = require("druid.component")
local rich_text = require("druid.custom.rich_text.rich_text")
---@class basic_rich_text: druid.base_component
---@field druid druid_instance
@@ -11,7 +10,7 @@ local M = component.create("basic_rich_text")
---@param nodes table<hash, node>
function M:init(template, nodes)
self.druid = self:get_druid(template, nodes)
self.druid:new(rich_text, "text", "Hello, I'm a <font=text_bold><color=E48155>Rich Text</font></color>!")
self.druid:new_rich_text("text", "Hello, I'm a <font=text_bold><color=E48155>Rich Text</font></color>!")
end