the pure style-mapping BitmapLabel builds its underlying BitmapText style from, exported for testing without constructing a BitmapText (which needs a real DOM document, unlike Text)
BitmapLabel
BitmapText
document
Text
import { bitmapLabelStyle } from '@datamoc/mw_games/two-d/ui';import { defaultTheme } from '@datamoc/mw_games/two-d/ui';const style = bitmapLabelStyle({ text: 'Score', bold: true }, defaultTheme);console.log(style.fontWeight); // 'bold' Copy
import { bitmapLabelStyle } from '@datamoc/mw_games/two-d/ui';import { defaultTheme } from '@datamoc/mw_games/two-d/ui';const style = bitmapLabelStyle({ text: 'Score', bold: true }, defaultTheme);console.log(style.fontWeight); // 'bold'
the pure style-mapping
BitmapLabelbuilds its underlyingBitmapTextstyle from, exported for testing without constructing aBitmapText(which needs a real DOMdocument, unlikeText)