parent
58e54dd802
commit
dddb9a0aea
@ -0,0 +1,46 @@
|
||||
import React, { useState, useEffect, useContext, useRef, memo } from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
import { getUrl2, isDev, ThemeContext } from 'educoder'
|
||||
import { Modal } from 'antd'
|
||||
|
||||
|
||||
function HeadlessModal (props) {
|
||||
// const [ visible, setVisible ] = useState(false)
|
||||
const theme = useContext(ThemeContext);
|
||||
const { category, visible, setVisible, className, width } = props;
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
className={`headless ${className}`}
|
||||
title={null}
|
||||
footer={null}
|
||||
width={width}
|
||||
>
|
||||
<style>{`
|
||||
.headless .ant-modal-close {
|
||||
display:none;
|
||||
}
|
||||
.headless .ant-modal-body {
|
||||
padding: 0px;
|
||||
}
|
||||
.headless .closeBtn {
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
right: -9px;
|
||||
color: ${theme.foreground_select}
|
||||
}
|
||||
`}</style>
|
||||
<i className="iconfont icon-htmal5icon19 closeBtn" onClick={ () => setVisible(false) }></i>
|
||||
{props.children}
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
|
||||
export default HeadlessModal
|
@ -0,0 +1,32 @@
|
||||
import React, { useState, useEffect, useContext, useRef, memo } from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
import { getUrl2, isDev, ThemeContext } from 'educoder'
|
||||
import axios from 'axios'
|
||||
|
||||
|
||||
function InfoTab (props) {
|
||||
|
||||
const theme = useContext(ThemeContext);
|
||||
const { category, changeCategory, categories } = props;
|
||||
const username = props.match.params.username
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="white-panel edu-back-white pt25 pb25 clearfix ">
|
||||
{categories && categories.map(item => {
|
||||
return (
|
||||
<li key={item.key} className={category == item.key ? "active" : ''}><a href="javascript:void(0)" onClick={()=>changeCategory(item.key)}>{item.name}</a></li>
|
||||
)
|
||||
})}
|
||||
{/* <li className={category ? "" : "active"}><a href="javascript:void(0)" onClick={()=>this.changeCategory()}>全部</a></li>
|
||||
<li className={category=="manage" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的</a></li>
|
||||
<li className={category=="study" ? "active" : ""}><a href="javascript:void(0)" onClick={()=>this.changeCategory("study")}>{is_current ? "我":"TA"}学习的</a></li> */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default InfoTab
|
Loading…
Reference in new issue