mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Fix gift tags
This commit is contained in:
parent
cecac30562
commit
8b2d9dc098
@ -132,9 +132,6 @@
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
height: 90px;
|
||||
min-height: 90px;
|
||||
max-height: 90px;
|
||||
border: none;
|
||||
resize: none;
|
||||
outline: none;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { FC } from 'react';
|
||||
import { Column, Flex, Text } from '..';
|
||||
import { LocalizeText } from '../../api';
|
||||
import { LayoutAvatarImageView } from './LayoutAvatarImageView';
|
||||
|
||||
@ -16,18 +17,23 @@ export const LayoutGiftTagView: FC<LayoutGiftTagViewProps> = props =>
|
||||
const { figure = null, userName = null, message = null, editable = false, onChange = null } = props;
|
||||
|
||||
return (
|
||||
<div className="nitro-gift-card d-flex text-black">
|
||||
<Flex overflow="hidden" className="nitro-gift-card text-black">
|
||||
<div className="d-flex align-items-center justify-content-center gift-face flex-shrink-0">
|
||||
{ !userName && <div className="gift-incognito"></div> }
|
||||
{ figure && <div className="gift-avatar">
|
||||
<LayoutAvatarImageView figure={ figure } direction={ 2 } headOnly={ true } />
|
||||
</div> }
|
||||
</div>
|
||||
<div className="d-flex flex-column w-100 pt-4 pb-4 pe-4 ps-3">
|
||||
{ !editable && <div className="gift-message">{ message }</div> }
|
||||
{ editable && onChange && <textarea className="gift-message" maxLength={ 140 } value={ message } onChange={ (e) => onChange(e.target.value) } placeholder={ LocalizeText('catalog.gift_wrapping_new.message_hint') }></textarea> }
|
||||
{ userName && <div className="mt-auto text-end fst-italic">{ LocalizeText('catalog.gift_wrapping_new.message_from', ['name'], [userName]) }</div> }
|
||||
</div>
|
||||
</div>
|
||||
<Flex overflow="hidden" className="w-100 pt-4 pb-4 pe-4 ps-3">
|
||||
<Column grow overflow="auto" justifyContent="between">
|
||||
{ !editable &&
|
||||
<Text textBreak className="gift-message">{ message }</Text> }
|
||||
{ editable && (onChange !== null) &&
|
||||
<textarea className="gift-message h-100" maxLength={ 140 } value={ message } onChange={ (e) => onChange(e.target.value) } placeholder={ LocalizeText('catalog.gift_wrapping_new.message_hint') }></textarea> }
|
||||
{ userName &&
|
||||
<Text italics textEnd className="pe-1">{ LocalizeText('catalog.gift_wrapping_new.message_from', ['name'], [userName]) }</Text> }
|
||||
</Column>
|
||||
</Flex>
|
||||
</Flex>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user