RowCard Component Reference

Table of Contents


Introduction

Syntax

tml`
	<RowCard>
		...
	</RowCard>
`

The RowCard component creates a <div> element for a rectangular area for related content within a <Page>. The content is organized as rows of information. Each row may be organized as zero or more pairs of labels and values. The labels and values will be horizontally aligned, if possible.

Typically, the CardRow children are Cr (row) components that, in turn, contain Cl (label) and Cv (value) components. For example:

tml`
	<RowCard title="My card">
		<Cr>
			<Cl>Label 1</>
			<Cv>Value 1</>
		</Cr>
		<Cr>
			<Cl>Label 2</>
			<Cv>Value 2</>
		</Cr>
	</RowCard>
`

Attributes

Using colStyle and rowStyle attributes

The RowCard component uses create a RowCard object in contextProps. The RowCard object contains colStyle and rowStyle as properties. This makes the current colStyle and rowStyle available to any descendant of the RowCard as this.props.RowCard.colStyle or this.props.RowCard.rowStyle.

The colStyle and rowStyle are used to set two CSS class names in the enclosing <div>: card_row-rowStyle-${rowStyle} and card_row-colStyle-${colStyle}. Applications can use their own CSS to modify the behavior of the built-in style strings, or add new strings. The default CSS behavior for colStyle and rowStyle is described in Cr Component Reference.

Children

All children must be Cr Components.

DOM element properties