Module:Test: Difference between revisions

From roblox chads wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 9: Line 9:
headerStyle = string.format('background-color:%s;', args.headerstyle)
headerStyle = string.format('background-color:%s;', args.headerstyle)
else
else
headerStyle = 'background-color:grey;'
headerStyle = 'background-color:blue;'
end
end
local retval = capiunto.create( {
local retval = capiunto.create( {

Revision as of 13:32, 2 November 2026

Documentation for this module may be created at Module:Test/doc

local capiunto = require 'capiunto'

local p = {}

function p.main(frame)
	local args = frame:getParent().args
	local headerStyle
	if args.headerstyle and args.headerstyle ~= '' then
		headerStyle = string.format('background-color:%s;', args.headerstyle)
	else
		headerStyle = 'background-color:blue;'
	end
	local retval = capiunto.create( {
		title = args.title,
		headerStyle = headerStyle, 
	} )
	:addImage( args.image, args.caption )
	:addHeader( 'A header between the data rows' )
	:addRow( 'Bar', args.bar )
	return retval
end

return p