dcl-ui-toolkit
Version:
A collection of UI helpers to make it easier to build a Decentraland scene using the SDK 7.
32 lines (31 loc) • 1.33 kB
TypeScript
import ReactEcs from '@dcl/sdk/react-ecs';
import { EntityPropTypes } from '@dcl/react-ecs/dist/components/types';
import { InPromptUIObject, InPromptUIObjectConfig } from '../../InPromptUIObject';
import { ImageAtlasData } from '../../../../../utils/imageUtils';
export type PromptIconImageElementProps = Omit<EntityPropTypes, 'uiTransform' | 'uiBackground'> & {
uiTransform?: Omit<NonNullable<EntityPropTypes['uiTransform']>, 'width' | 'height' | 'position' | 'display'>;
uiBackground?: Omit<NonNullable<EntityPropTypes['uiBackground']>, 'uvs'> & {
texture?: Omit<NonNullable<NonNullable<EntityPropTypes['uiBackground']>['texture']>, 'src'>;
};
};
export type PromptIconConfig = InPromptUIObjectConfig & {
image: string;
width?: number;
height?: number;
xPosition?: number;
yPosition?: number;
section?: ImageAtlasData;
};
export declare class PromptIcon extends InPromptUIObject {
imageElement: PromptIconImageElementProps;
image: string;
width: number;
height: number;
xPosition: number;
yPosition: number;
section: ImageAtlasData | undefined;
private _xPosition;
private _yPosition;
constructor({ section, parent, startHidden, image, width, height, xPosition, yPosition, }: PromptIconConfig);
render(key?: string): ReactEcs.JSX.Element;
}