Catalog changes

This commit is contained in:
Bill 2022-03-23 22:56:59 -04:00
parent 7c8d5928dd
commit f64365a976
5 changed files with 7 additions and 14 deletions

View File

@ -20,13 +20,6 @@
}
}
.catalog-icon-image {
width: 20px;
height: 20px;
min-width: 20px;
min-height: 20px;
}
.nitro-catalog-gift {
width: 325px;

View File

@ -16,5 +16,5 @@ export const CatalogIconView: FC<CatalogIconViewProps> = props =>
return ((GetConfiguration<string>('catalog.asset.icon.url')).replace('%name%', icon.toString()));
}, [ icon ]);
return <LayoutImage imageUrl={ getIconUrl } fit={ false } className="catalog-icon-image" />;
return <LayoutImage imageUrl={ getIconUrl } style={ { width: 20, height: 20 } } />;
}

View File

@ -1,10 +1,10 @@
import { FrontPageItem } from '@nitrots/nitro-renderer';
import { FC, useMemo } from 'react';
import { GetConfiguration } from '../../../../../../api';
import { LayoutImage, LayoutImageProps } from '../../../../../../common/layout/LayoutImage';
import { LayoutBackgroundImage, LayoutBackgroundImageProps } from '../../../../../../common';
import { Text } from '../../../../../../common/Text';
export interface CatalogLayoutFrontPageItemViewProps extends LayoutImageProps
export interface CatalogLayoutFrontPageItemViewProps extends LayoutBackgroundImageProps
{
item: FrontPageItem;
}
@ -27,11 +27,11 @@ export const CatalogLayoutFrontPageItemView: FC<CatalogLayoutFrontPageItemViewPr
const imageUrl = (GetConfiguration<string>('image.library.url') + item.itemPromoImage);
return (
<LayoutImage imageUrl={ imageUrl } classNames={ getClassNames } position={ position } fullHeight={ fullHeight } pointer={ pointer } overflow={ overflow } { ...rest }>
<LayoutBackgroundImage imageUrl={ imageUrl } classNames={ getClassNames } position={ position } fullHeight={ fullHeight } pointer={ pointer } overflow={ overflow } { ...rest }>
<Text position="absolute" variant="white" className="bg-dark rounded p-2 m-2 bottom-0">
{ item.itemName }
</Text>
{ children }
</LayoutImage>
</LayoutBackgroundImage>
);
}

View File

@ -68,7 +68,7 @@ export const CatalogLayoutMarketplaceItemView: FC<MarketplaceItemViewProps> = pr
return (
<LayoutGridItem shrink center={ false } column={ false } alignItems="center" className="p-1">
<LayoutImage imageUrl={ getImageUrlForOffer() } fit={ false } style={ { width: 50, height: 50 } } />
<LayoutImage imageUrl={ getImageUrlForOffer() } style={ { width: 50, height: 50 }} />
<Column grow gap={ 0 }>
<Text fontWeight="bold">{ getMarketplaceOfferTitle }</Text>
{ (type === OWN_OFFER) &&

View File

@ -47,7 +47,7 @@ export const VipGiftItem : FC<VipGiftItemViewProps> = props =>
return (
<LayoutGridItem center={ false } column={ false } alignItems="center" className="p-1">
<LayoutImage imageUrl={ getImageUrlForOffer() } fit={ false } style={ { width: 50, height: 50 } } />
<LayoutImage imageUrl={ getImageUrlForOffer() } />
<Text grow fontWeight="bold">{ getItemTitle() }</Text>
<Button variant="secondary" onClick={ () => onSelect(offer.localizationId) }>
{ LocalizeText('catalog.club_gift.select') }