moonstone/MoonstoneDecorator

import MoonstoneDecorator from '@enact/moonstone/MoonstoneDecorator';

Members

MoonstoneDecoratorHigher-Order Component

moonstone/MoonstoneDecorator.MoonstoneDecorator is a Higher-order Component that applies Moonstone theming to an application. It also applies floating layer, resolution independence, custom text sizing, skin support, spotlight, and internationalization support. It is meant to be applied to the root element of an app.

Skins provide a way to change the coloration of your app. The currently supported skins for Moonstone are "moonstone" (the default, dark skin) and "moonstone-light". Use the skin property to assign a skin. Ex: <DecoratedApp skin="light" />

import MoonstoneDecorator from '@enact/moonstone/MoonstoneDecorator';

AccessibilityDecoratorHigher-Order Component

moonstone/MoonstoneDecorator.AccessibilityDecorator is a Higher-order Component that classifies an application with a target set of font sizing rules

import {AccessibilityDecorator} from '@enact/moonstone/MoonstoneDecorator';
Properties added to wrapped component
highContrast
Boolean

Enables additional features to help users visually differentiate components. The UI library will be responsible for using this information to adjust the components' contrast to this preset.

textSize
String

Set the goal size of the text. The UI library will be responsible for using this information to adjust the components' text sizes to this preset. Current presets are 'normal' (default), and 'large'.

Default: 'normal'

TextSizeDecoratorHigher-Order Component

will be replaced by AccessibilityDecorator in 2.0.0

moonstone/MoonstoneDecorator.TextSizeDecorator is a Higher-order Component that classifies an application with a target set of font sizing rules

import {TextSizeDecorator} from '@enact/moonstone/MoonstoneDecorator';

defaultConfig

ArrayBooleanFunctionModuleNumberObjectString