nitro-react/src/common/layout/LayoutTrophyView.tsx

40 lines
1.4 KiB
TypeScript
Raw Normal View History

2021-07-27 09:28:26 +02:00
import { FC } from 'react';
2021-08-17 05:38:07 +02:00
import { LocalizeText } from '../../api';
2021-07-27 09:28:26 +02:00
import { DraggableWindow } from '../draggable-window';
2022-03-03 08:23:01 +01:00
interface LayoutTrophyViewProps
{
color: string;
message: string;
date: string;
senderName: string;
customTitle?: string;
onCloseClick: () => void;
}
export const LayoutTrophyView: FC<LayoutTrophyViewProps> = props =>
2021-07-27 09:28:26 +02:00
{
2021-09-03 07:44:58 +02:00
const { color = '', message = '', date = '', senderName = '', customTitle = null, onCloseClick = null } = props;
2021-07-27 09:28:26 +02:00
return (
2021-08-09 18:35:17 +02:00
<DraggableWindow handleSelector=".drag-handler">
2021-07-27 09:28:26 +02:00
<div className={ `nitro-layout-trophy trophy-${ color }` }>
<div className="trophy-header drag-handler">
<div className="float-end trophy-close" onClick={ onCloseClick }></div>
<div className="trophy-title fw-bold text-center">
{ LocalizeText('widget.furni.trophy.title') }
</div>
</div>
<div className="trophy-content">
2021-09-03 07:44:58 +02:00
{ customTitle && <div className="mb-2 fw-bold">{ customTitle }</div> }
2021-07-27 09:28:26 +02:00
{ message }
</div>
<div className="trophy-footer d-flex justify-content-between fw-bold">
<div>{ date }</div>
<div>{ senderName }</div>
</div>
</div>
</DraggableWindow>
);
}