dcl-ui-toolkit
Version:
A collection of UI helpers to make it easier to build a Decentraland scene using the SDK 7.
29 lines (28 loc) • 1.28 kB
TypeScript
import ReactEcs from '@dcl/sdk/react-ecs';
import { EntityPropTypes } from '@dcl/react-ecs/dist/components/types';
import { UiInputProps } from '@dcl/react-ecs/dist/components/Input/types';
import { InPromptUIObject, InPromptUIObjectConfig } from '../../InPromptUIObject';
export type PromptInputFillInBoxElementProps = Partial<Omit<UiInputProps, 'onChange' | 'placeholder'>> & Omit<EntityPropTypes, 'uiTransform'> & {
uiTransform?: Omit<NonNullable<EntityPropTypes['uiTransform']>, 'position' | 'display'>;
};
export type PromptInputConfig = InPromptUIObjectConfig & {
placeholder?: string | number;
xPosition?: number;
yPosition?: number;
positionAbsolute?: boolean;
onChange?: (value: string) => void;
};
export declare class PromptInput extends InPromptUIObject {
fillInBoxElement: PromptInputFillInBoxElementProps;
placeholder: string | number;
xPosition: number;
yPosition: number;
positionAbsolute: boolean;
onChange: (value: string) => void;
private _xPosition;
private _yPosition;
private readonly _width;
private readonly _height;
constructor({ parent, startHidden, placeholder, xPosition, yPosition, positionAbsolute, onChange, }: PromptInputConfig);
render(key?: string): ReactEcs.JSX.Element;
}