UNPKG

dcl-ui-toolkit

Version:

A collection of UI helpers to make it easier to build a Decentraland scene using the SDK 7.

28 lines (27 loc) 1.18 kB
import ReactEcs from '@dcl/sdk/react-ecs'; import { Color4 } from '@dcl/sdk/math'; import { EntityPropTypes } from '@dcl/react-ecs/dist/components/types'; import { UiLabelProps } from '@dcl/react-ecs/dist/components/Label/types'; import { InPromptUIObject, InPromptUIObjectConfig } from '../../InPromptUIObject'; export type PromptTextTextElementProps = Omit<UiLabelProps, 'value' | 'color' | 'fontSize'> & Omit<EntityPropTypes, 'uiTransform'> & { uiTransform?: Omit<NonNullable<EntityPropTypes['uiTransform']>, 'display' | 'margin'>; }; export type PromptTextConfig = InPromptUIObjectConfig & { value: string | number; xPosition?: number; yPosition?: number; positionAbsolute?: boolean; color?: Color4; size?: number; }; export declare class PromptText extends InPromptUIObject { textElement: PromptTextTextElementProps; value: string | number; xPosition: number; yPosition: number; positionAbsolute: boolean; color: Color4 | undefined; size: number; constructor({ color, parent, startHidden, value, xPosition, yPosition, positionAbsolute, size, }: PromptTextConfig); render(key?: string): ReactEcs.JSX.Element; }