You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
594 B
30 lines
594 B
2 years ago
|
import React from 'react'
|
||
|
import { render } from 'react-dom'
|
||
|
|
||
|
export default class Layers extends React.Component{
|
||
|
render(){
|
||
|
consttuctor(props){
|
||
|
super(props)
|
||
|
active = this.menuBtn[0]
|
||
|
|
||
|
}
|
||
|
return(
|
||
|
this.props.menuButton.map((it, p) => (
|
||
|
<div
|
||
|
id={it.text}
|
||
|
style={this.menuBtn.all}
|
||
|
onClick={() => (
|
||
|
(this.active = this.props.text),
|
||
|
this.chechActive(it.text),
|
||
|
console.log(this.active),
|
||
|
ReactDOM.render(
|
||
|
this.menuButton[p].handler(),
|
||
|
document.getElementById("listOve")
|
||
|
)
|
||
|
)}
|
||
|
>
|
||
|
{it.text}
|
||
|
</div>
|
||
|
))
|
||
|
|
||
|
)}}
|