Merge pull request #260 from Fossean1/patch-2

This commit is contained in:
Maksim Tuprikov 2024-03-25 09:32:31 +02:00 committed by GitHub
commit 0e9445b1a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,7 @@ You can pass _nil_ or _empty_table_ to use default values for all components (no
local druid = require("druid.druid")
local my_style = require("my.amazing.style")
local function init(self)
function init(self)
druid.set_default_style(my_style)
end
```
@ -24,7 +24,7 @@ Setup custom style to specific druid instance:
local druid = require("druid.druid")
local my_style = require("my.amazing.style")
local function init(self)
function init(self)
-- This druid instance will be use my_style as default
self.druid = druid.new(self, my_style)
end
@ -35,7 +35,7 @@ Change component style with _set_style_ function
local druid = require("druid.druid")
local my_style = require("my.amazing.style")
local function init(self)
function init(self)
self.druid = druid.new(self)
self.button = self.druid:new_button("node", function() end)
-- Setup custom style for specific component