import * as React from 'react';
import * as ReactDom from 'react-dom';
require("./style/global.pcss")
import { HashRouter, Switch , Route ,Link } from 'react-router-dom'
import SimpleDrawer from "../../src/ts/SimpleDrawer/SimpleDrawer";
import Playground0 from "./Pages/Playground0";
import Playground1 from "./Pages/Playground1";
import ToyButtonPage from "./Pages/ToyButtonPage";
import ExpandMenu from "../../src/ts/ExpandMenu/ExpandMenu";
import SimpleCardPage from "./Pages/SimpleCardPage";
import SimpleModalPage from "./Pages/SimpleModalPage";
import PopupCardPage from "./Pages/PopupCardPage";
const style = require("./Pages/PageStyle.pcss");
const Ink = require("react-ink");
const FontAwesome = require('react-fontawesome');
const header = ({onTouchMenu})=>{
return (
onTouchMenu()}>
naoto243-react-kit
);
}
const NoMatch = ()=>{
return (
404
);
}
class SampleApp extends React.Component{
constructor(props) {
super(props);
console.log("hoge")
this.state = {
open : false
}
}
componentWillMount() : void {
}
componentDidMount() : void {
}
componentWillUpdate() : void {
}
componentDidUpdate() : void {
}
componentWillUnmount() : void {
//viewのデストラクタ
}
toggleOpen(){
this.setState({
open : !this.state.open
})
}
ChildMenu = ({name , open})=>{
return (
);
}
ChildMenuLink = ({name , location})=>{
return (
{
console.log(this.router)
this.router.history.push(location);
this.toggleOpen()
}}
>
{name}
);
}
GrandChildMenu = ({location , name})=>{
return (
{
console.log(this.router)
this.router.history.push(location);
this.toggleOpen()
}}
key={location + name} className={style.nested_item}>
{name}
);
}
AllMenu = ()=> {
return (
}/>
}
childList={[
} />,
} />,
]}
className={style.list_item_parent}
/>
}
childList={[
} />,
} />,
]}
className={style.list_item_parent}
/>
}/>
);
}
router;
render() {
console.log(window.location.hash)
return (
{
this.router = ref;
}}>
this.toggleOpen()}
open={this.state.open}
navRender={()=>{
return (
);
}}
navStyle={{
width : "250px",
boxShadow: "0 0 14px rgba(0,0,0,0.50),0 0px 0px 0px rgba(0,0,0,0.24)",
}}
closeOffset="-270px"
/>
{header({
onTouchMenu : ()=> this.toggleOpen()
})}
);
}
}
ReactDom.render( , document.getElementById("app"));