Update style

This commit is contained in:
Jeremie Pardou-Piquemal 2020-06-16 21:07:29 +02:00
parent 23eabcab83
commit c35ad31ace
2 changed files with 38 additions and 16 deletions

View file

@ -35,7 +35,7 @@ export const GameController = ({
const [c2c, joined, isMaster] = useC2C();
const [downloadURI, setDownloadURI] = React.useState({});
const [date, setDate] = React.useState(Date.now());
/*const [gameSave, setGameSave] = useLocalStorage('savedGame', {
/*const [gameLocalSave, setGameLocalSave] = useLocalStorage('savedGame', {
items: [],
board: {},
});*/

View file

@ -140,7 +140,7 @@ const Image = ({
unflippedFor,
extraStyling,
imgText,
backImgText
backImgText,
}) => {
const user = useRecoilValue(userAtom);
const size = {};
@ -176,22 +176,33 @@ const Image = ({
if (backContent && (flipped || (unflippedFor && unflippedFor !== user.id))) {
image = (
<>
{ imgText && (
<div class='image-text' style={{position: 'absolute', right: 0, padding: '0 3px', margin: '7px', 'background-color': 'white', color: 'black', 'border-radius': '50%'}}>
{backImgText}
</div>
)}
<img
src={backContent}
draggable={false}
{...size}
style={{ userSelect: 'none', pointerEvents: 'none', ...extraStyling }}
/>
{imgText && (
<div
className='image-text'
style={{
position: 'absolute',
right: 0,
padding: '0 3px',
margin: '7px',
'background-color': 'white',
color: 'black',
'border-radius': '50%',
}}
>
{backImgText}
</div>
)}
<img
src={backContent}
draggable={false}
{...size}
style={{ userSelect: 'none', pointerEvents: 'none', ...extraStyling }}
/>
</>
);
} else {
image = (
<div class='image-wrapper' style={{position: 'relative'}}>
<div className='image-wrapper' style={{ position: 'relative' }}>
{unflippedFor && (
<div
style={{
@ -207,8 +218,19 @@ const Image = ({
Only you
</div>
)}
{ imgText && (
<div class='image-text' style={{position: 'absolute', right: 0, padding: '0 3px', margin: '7px', 'background-color': 'white', color: 'black', 'border-radius': '50%'}}>
{imgText && (
<div
class='image-text'
style={{
position: 'absolute',
right: 0,
padding: '0 3px',
margin: '7px',
'background-color': 'white',
color: 'black',
'border-radius': '50%',
}}
>
{imgText}
</div>
)}