Renaming the background component as layer.
This commit is contained in:
parent
e0b6c69cfc
commit
828eac45ff
|
@ -1,8 +1,8 @@
|
||||||
import react from 'react';
|
import react from 'react';
|
||||||
|
|
||||||
import '../theme/background.css';
|
import '../theme/layer.css';
|
||||||
|
|
||||||
const Background: react.FC<{
|
const Layer: react.FC<{
|
||||||
shift: { x: number; y: number };
|
shift: { x: number; y: number };
|
||||||
zoom: number;
|
zoom: number;
|
||||||
children?: JSX.Element;
|
children?: JSX.Element;
|
||||||
|
@ -28,4 +28,4 @@ const Background: react.FC<{
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Background;
|
export default Layer;
|
|
@ -2,7 +2,7 @@ import react, { useCallback, useState } from 'react';
|
||||||
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import Background from './background';
|
import Layer from './layer';
|
||||||
|
|
||||||
import '../theme/viewport.css';
|
import '../theme/viewport.css';
|
||||||
|
|
||||||
|
@ -221,9 +221,9 @@ const Viewport: react.FC<{}> = (props: {}) => {
|
||||||
onTouchEnd={touchEndHandler}
|
onTouchEnd={touchEndHandler}
|
||||||
onTouchCancel={mouseLeaveHandler}
|
onTouchCancel={mouseLeaveHandler}
|
||||||
>
|
>
|
||||||
<Background shift={shift} zoom={zoom}>
|
<Layer shift={shift} zoom={zoom}>
|
||||||
<img src='/assets/background.jpg' alt='' />
|
<img src='/assets/background.jpg' alt='' />
|
||||||
</Background>
|
</Layer>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue