5180 fichiers 38.5 Mo 0 téléchargements 215 vues mis à jour il y a 5 heures ui
nitro-v36-with-renderer-v36 / src / components / backgrounds / ProfilePreviewView.tsx
ProfilePreviewView.tsx 1.2 Ko Télécharger le fichier
import { FC } from 'react';
import { Base, LayoutAvatarImageView } from '../../common';
import { NativeTextTree } from '../../common/native-text/NativeTextTree';
import { ToggleButton } from '../../common/ToggleButton';

interface ProfilePreviewViewProps {
    figure: string;
    backgroundId: number | null;
    standId: number | null;
    overlayId: number | null;
    selected?: boolean;
    onClick?: () => void;
}

/** The profile picture as it looks in the info panel, for one choice in the picker. */
export const ProfilePreviewView: FC<ProfilePreviewViewProps> = ({ figure, backgroundId, standId, overlayId, selected = false, onClick }) => (
    <NativeTextTree>
        <ToggleButton pressed={selected}
            className={`profile-preview profile-background background-${backgroundId ?? 'default'}${selected ? ' is-selected' : ''}`}
            data-testid="profile-preview"
            onClick={onClick}
        >
            <Base position="absolute" className={`profile-stand stand-${standId ?? 'default'}`} />
            <LayoutAvatarImageView direction={2} figure={figure} />
            <Base position="absolute" className={`profile-overlay overlay-${overlayId ?? 'default'}`} />
        </ToggleButton>
    </NativeTextTree>
);
15Sujets
1Dépôts
20Membres
2En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser