Class MjSocialElement
java.lang.Object
dev.jcputney.mjml.component.BaseComponent
dev.jcputney.mjml.component.BodyComponent
dev.jcputney.mjml.component.interactive.MjSocialElement
A single social element (
<mj-social-element>). Renders a table containing a social icon
image and an optional text label. When used in horizontal mode, each element is wrapped in its
own inline table. When used in vertical mode, each element is a row in the parent's shared table.-
Field Summary
Fields inherited from class BaseComponent
globalContext, node, renderContext -
Constructor Summary
ConstructorsConstructorDescriptionMjSocialElement(MjmlNode node, GlobalContext globalContext, RenderContext renderContext) -
Method Summary
Modifier and TypeMethodDescriptionReturns the default attribute values for this component.Returns the MJML tag name this component handles.render()Renders this component to HTML.renderHorizontal(MjSocial parent) Renders this element in horizontal mode (each element in its own inline table).renderVertical(MjSocial parent) Renders this element in vertical mode (a single row in the parent's shared table).Methods inherited from class BodyComponent
addBorderStyles, addIfPresent, addIfPresent, buildAttributes, buildResponsiveClass, buildStyle, escapeAttr, escapeHref, getBoxModel, getChildrenByTags, getContentWidth, orderedMap, parseWidth, registerMediaQuery, renderChildren, resolveShorthandSide, sanitizeContent, sanitizeHrefMethods inherited from class BaseComponent
getAttribute, getAttribute, getNode
-
Constructor Details
-
MjSocialElement
-
-
Method Details
-
getTagName
Description copied from class:BaseComponentReturns the MJML tag name this component handles.- Specified by:
getTagNamein classBaseComponent- Returns:
- the MJML tag name
-
getDefaultAttributes
Description copied from class:BaseComponentReturns the default attribute values for this component.- Specified by:
getDefaultAttributesin classBaseComponent- Returns:
- a map of attribute names to their default values
-
render
Description copied from class:BodyComponentRenders this component to HTML.- Specified by:
renderin classBodyComponent- Returns:
- the rendered HTML string
-
renderHorizontal
-
renderVertical
-