mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update examples to widgets instead components
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
local component = require("druid.component")
|
||||
---@class examples.basic_back_handler: druid.widget
|
||||
local M = {}
|
||||
|
||||
---@class examples.basic_back_handler: druid.component
|
||||
---@field druid druid.instance
|
||||
local M = component.create("basic_back_handler")
|
||||
|
||||
|
||||
---@param template string
|
||||
---@param nodes table<hash, node>
|
||||
function M:init(template, nodes)
|
||||
self.druid = self:get_druid(template, nodes)
|
||||
function M:init()
|
||||
self.druid:new_back_handler(self.on_back)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user