mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Add appWrapper and first home app!!! :O
This commit is contained in:
1 parent
f98e0d536d
commit
16004a9a86
9 files changed
+129
-13
No files matched your search
@@ -31,6 +31,13 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.PhoneAppContainer {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
+7
-3
@@ -1,19 +1,23 @@
|
||||
import React from "react";
|
||||
import "./Phone.css";
|
||||
import { HomeApp } from "./apps/home";
|
||||
import { Route } from "react-router-dom";
|
||||
|
||||
function Phone() {
|
||||
return (
|
||||
<div className="PhoneWrapper">
|
||||
<div style={{ zoom: '80%' }}>
|
||||
<div style={{ zoom: "80%" }}>
|
||||
<div className="Phone">
|
||||
<div
|
||||
className="PhoneFrame"
|
||||
style={{
|
||||
backgroundImage: `url(/public/media/frames/defaults.png)`,
|
||||
backgroundImage: `${process.env.PUBLIC_URL}url(/media/frames/default.png)`,
|
||||
}}
|
||||
></div>
|
||||
<div className="PhoneScreen" id="phone">
|
||||
Wasap
|
||||
<div className="PhoneAppContainer">
|
||||
<Route exact path="/" component={HomeApp} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import React from 'react';
|
||||
import { AppWrapper } from '../../../ui/components';
|
||||
|
||||
export const HomeApp = ({}) => {
|
||||
return <AppWrapper style={{backgroundImage: `${process.env.PUBLIC_URL}url(/media/backgrounds/default.png)` }}>Home!</AppWrapper>
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export * from './components/Home';
|
||||
+10
-7
@@ -1,14 +1,17 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import './main.css';
|
||||
import Phone from './Phone';
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import "./main.css";
|
||||
import Phone from "./Phone";
|
||||
import * as serviceWorker from "./serviceWorker";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<Phone />
|
||||
<BrowserRouter>
|
||||
<Phone />
|
||||
</BrowserRouter>
|
||||
</React.StrictMode>,
|
||||
document.getElementById('root')
|
||||
document.getElementById("root")
|
||||
);
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import React from 'react';
|
||||
|
||||
export const AppWrapper = ({ children, style, ...props }) => {
|
||||
return <div {...props} style={{width: '100%', height: '100%', display: 'flex', ...style}}>{children}</div>
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export * from './AppWrapper';
|
||||
Reference in new issue
Block a user