from emailer_lib.mjml import section, text
child = text("Hello World")
result = section(child)mjml.section
mjml.section(*args, attributes=None, content=None)Create an MJML <mj-section> tag.
Parameters
*args : TagChild = ()-
Children (MJMLTag objects)
attributes : Optional[TagAttrs] = None-
Optional dict of tag attributes
content : Optional[str] = None-
Optional text content for the tag
Returns
: MJMLTag-
MJMLTag object representing
<mj-section>
Examples
With children:
With attributes:
result = section(attributes={"attr": "value"})With both:
result = section(child, attributes={"background-color": "yellow"})