webmcp
diff framework/env/ui_deprecated/box.lua @ 0:9fdfb27f8e67
Version 1.0.0
author | jbe/bsw |
---|---|
date | Sun Oct 25 12:00:00 2009 +0100 (2009-10-25) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/framework/env/ui_deprecated/box.lua Sun Oct 25 12:00:00 2009 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +--[[doc: ui_deprecated.box 1.5 + 1.6 +Starts a box 1.7 + 1.8 +label (string) Label, optional 1.9 +class (string) Style class, optional 1.10 +content (function) or (string) The content of the box 1.11 + 1.12 + 1.13 +Example: 1.14 + 1.15 +ui_deprecated.box{ 1.16 + label = 'My box label', 1.17 + class = 'my_css_class', 1.18 + content = function() 1.19 + ui_deprecated.text('My text') 1.20 + end 1.21 +} 1.22 + 1.23 +--]] 1.24 + 1.25 +function ui_deprecated.box(args) 1.26 + if args.class then 1.27 + args.html_options = args.html_options or {} 1.28 + args.html_options.class = args.class 1.29 + end 1.30 + ui_deprecated.tag('div', args) 1.31 +end 1.32 +