UNPKG

@dcl/react-ecs

Version:
33 lines (32 loc) 1.05 kB
import { ReactEcs } from '../react-ecs'; import { getFont, getFontSize, getTextAlign, getTextWrap } from './Label/utils'; import { parseProps } from './utils'; export * from './types'; export * from './uiTransform/types'; export * from './listeners/types'; export * from './Input/types'; export * from './uiBackground/types'; export * from './Dropdown/types'; export * from './Label/types'; export * from './Button/types'; export { Dropdown } from './Dropdown'; export { Input } from './Input'; export { Label, scaleFontSize } from './Label'; export { Button } from './Button'; /** * @public * @category Component */ /* @__PURE__ */ export function UiEntity(props) { const uiText = props.uiText && { uiText: { ...props.uiText, ...getFont(props.uiText.font), ...getTextAlign(props.uiText.textAlign), ...getFontSize(props.uiText.fontSize), ...getTextWrap(props.uiText.textWrap) } }; return ReactEcs.createElement("entity", { ...parseProps(props), ...uiText }); }