5180 fichiers 38.5 Mo 0 téléchargements 303 vues mis à jour il y a 6 heures ui
nitro-v36-with-renderer-v36 / src / components / inventory / views / InventoryCategoryEmptyView.tsx
InventoryCategoryEmptyView.tsx 1.3 Ko Télécharger le fichier
import { CreateLinkEvent } from '@octane/renderer';
import { FC } from 'react';
import { LocalizeText } from '../../../api';
import { NativeTextTree } from '../../../common/native-text/NativeTextTree';
import { OctaneButton } from '../../../layout';

export interface InventoryCategoryEmptyViewProps {
    title: string;
    desc: string;
    /** What the button does and says; it opens the catalog when left out. */
    actionLabel?: string;
    onAction?: () => void;
}

export const InventoryCategoryEmptyView: FC<InventoryCategoryEmptyViewProps> = (props) => {
    const { title = '', desc = '', actionLabel = null, onAction = null } = props;

    return (
        <NativeTextTree>
            <div className="octane-inventory-empty">
                <div className="octane-inventory-empty-image" aria-hidden="true" />
                <div className="octane-inventory-empty-copy">
                    <div className="octane-inventory-empty-title">{title}</div>
                    <div className="octane-inventory-empty-desc">{desc}</div>
                </div>
                <OctaneButton className="octane-inventory-empty-shop" onClick={onAction ?? (() => CreateLinkEvent('catalog/toggle/normal'))}>
                    {actionLabel ?? LocalizeText('inventory.open.catalog')}
                </OctaneButton>
            </div>
        </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