mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Fix mini-camera layout
This commit is contained in:
parent
ca18bf2f30
commit
909fbc1715
@ -25,4 +25,5 @@
|
||||
@import './card/NitroCardView';
|
||||
@import './draggable-window/DraggableWindow';
|
||||
@import './loading-spinner/LoadingSpinnerView';
|
||||
@import './mini-camera/NitroLayoutMiniCameraView';
|
||||
@import './trophy/NitroLayoutTrophyView';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FC } from 'react';
|
||||
import { FC, MouseEvent, useCallback } from 'react';
|
||||
import { useNitroCardContext } from '../context/NitroCardContext';
|
||||
import { NitroCardHeaderViewProps } from './NitroCardHeaderView.types';
|
||||
|
||||
@ -7,6 +7,12 @@ export const NitroCardHeaderView: FC<NitroCardHeaderViewProps> = props =>
|
||||
const { headerText = null, onCloseClick = null } = props;
|
||||
const { simple = false } = useNitroCardContext();
|
||||
|
||||
const onMouseDown = useCallback((event: MouseEvent<HTMLDivElement>) =>
|
||||
{
|
||||
event.stopPropagation();
|
||||
event.nativeEvent.stopImmediatePropagation();
|
||||
}, []);
|
||||
|
||||
if(simple)
|
||||
{
|
||||
return (
|
||||
@ -14,7 +20,7 @@ export const NitroCardHeaderView: FC<NitroCardHeaderViewProps> = props =>
|
||||
<div className="row nitro-card-header simple-header">
|
||||
<div className="d-flex justify-content-center align-items-center w-100 position-relative">
|
||||
<div className="h5 text-white text-center text-shadow bg-tertiary-split border-top-0 rounded-bottom drag-handler">{ headerText }</div>
|
||||
<div className="position-absolute header-close" onMouseDown={ event => event.stopPropagation() } onClick={ onCloseClick }>
|
||||
<div className="position-absolute header-close" onMouseDownCapture={ onMouseDown } onClick={ onCloseClick }>
|
||||
<i className="fas fa-times" />
|
||||
</div>
|
||||
</div>
|
||||
@ -28,7 +34,7 @@ export const NitroCardHeaderView: FC<NitroCardHeaderViewProps> = props =>
|
||||
<div className="row nitro-card-header">
|
||||
<div className="d-flex justify-content-center align-items-center w-100 position-relative">
|
||||
<div className="h4 text-white text-shadow header-text">{ headerText }</div>
|
||||
<div className="position-absolute header-close" onMouseDown={ event => event.stopPropagation() } onClick={ onCloseClick }>
|
||||
<div className="position-absolute header-close" onMouseDownCapture={ onMouseDown } onClick={ onCloseClick }>
|
||||
<i className="fas fa-times" />
|
||||
</div>
|
||||
</div>
|
||||
|
13
src/layout/mini-camera/NitroLayoutMiniCameraView.scss
Normal file
13
src/layout/mini-camera/NitroLayoutMiniCameraView.scss
Normal file
@ -0,0 +1,13 @@
|
||||
.nitro-room-thumbnail-camera {
|
||||
width: 132px;
|
||||
height: 192px;
|
||||
background-image: url('../../assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png');
|
||||
|
||||
.camera-frame {
|
||||
position: absolute;
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
margin-top: 38px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user