mirror of
https://github.com/airstruck/luigi.git
synced 2025-12-19 02:16:43 +00:00
clean up rendering, allow configurable themes
This commit is contained in:
@@ -19,10 +19,16 @@ function Layout:constructor (data)
|
||||
end
|
||||
|
||||
function Layout:setStyle (rules)
|
||||
if type(rules) == 'function' then
|
||||
rules = rules()
|
||||
end
|
||||
self.style = Style(rules or {}, 'id', 'style')
|
||||
end
|
||||
|
||||
function Layout:setTheme (rules)
|
||||
if type(rules) == 'function' then
|
||||
rules = rules()
|
||||
end
|
||||
self.theme = Style(rules or {}, 'type')
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user