2019-12-17 20:25:57 +00:00
|
|
|
import * as React from 'react';
|
|
|
|
import * as styles from './StickerPackPreview.scss';
|
|
|
|
import { useI18n } from '../util/i18n';
|
|
|
|
|
|
|
|
export type Props = {
|
|
|
|
images: Array<string>;
|
|
|
|
title: string;
|
|
|
|
author: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const StickerPackPreview = React.memo(
|
|
|
|
({ images, title, author }: Props) => {
|
|
|
|
const i18n = useI18n();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={styles.container}>
|
|
|
|
<div className={styles.titleBar}>
|
|
|
|
{i18n('StickerCreator--Preview--title')}
|
|
|
|
</div>
|
|
|
|
<div className={styles.scroller}>
|
|
|
|
<div className={styles.grid}>
|
2020-09-14 21:56:35 +00:00
|
|
|
{images.map(src => (
|
|
|
|
<img key={src} className={styles.sticker} src={src} alt={src} />
|
2019-12-17 20:25:57 +00:00
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles.meta}>
|
|
|
|
<div className={styles.metaTitle}>{title}</div>
|
|
|
|
<div className={styles.metaAuthor}>{author}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|