Update README

This commit is contained in:
Insality
2020-03-22 12:54:56 +03:00
parent 6367e66203
commit 7b2578c0ef
6 changed files with 84 additions and 27 deletions

View File

@@ -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.