mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update README
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
# Creating custom components
|
||||
|
||||
## Overview
|
||||
|
||||
Druid allows you to create your custom components from druid basic components or other custom components
|
||||
|
||||
|
||||
## Custom components
|
||||
|
||||
Basic custom component template looks like this:
|
||||
```lua
|
||||
local const = require("druid.const")
|
||||
@@ -102,4 +104,9 @@ function M.init(self, template_name, node_table)
|
||||
local my_style = self:get_style()
|
||||
end
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
## Power of using templates
|
||||
|
||||
You can use one component, but creating and customizing templates for them. Templates only requires to match the component scheme.
|
Reference in New Issue
Block a user