moonstone/ Body Text
Moonstone styled text block components and behaviors.
import BodyText from '@enact/moonstone/BodyText';Members
BodyTextComponent
A simple text block component, ready to use in Moonstone applications.
BodyText may be used to display a block of text and is sized and spaced appropriately for a
Moonstone application.
Usage:
<BodyText>
I have a Ham radio. There are many like it, but this one is mine.
</BodyText>import BodyText from '@enact/moonstone/BodyText';BodyTextBaseComponent
A simple text block component.
This component is most often not used directly but may be composed within another component as it is within BodyText.
import {BodyTextBase} from '@enact/moonstone/BodyText';Properties
Centers the contents.
Applies the
centeredCSS class which can be customized by theming.Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
bodyText- The root class name
Toggles multi-line (
false) vs single-line (true) behavior.noWrapmode automatically enables moonstone/Marquee so long text isn't permanently occluded.Default: falseSets the text size to one of the preset sizes. Available sizes: 'large' (default) and 'small'.
Default: 'large'
BodyTextDecoratorHigher-Order Component
Applies Moonstone specific behaviors to BodyText.
import {BodyTextDecorator} from '@enact/moonstone/BodyText';