forgeplus-react/src/forge/Team/Component/LeaveTeam.jsx

21 lines
675 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React, { useState } from 'react';
import styled from 'styled-components';
import Modals from './Modals';
const ALink = styled.a`{
color:#F73030!important;
}`
function LeaveTeam({ teamID , onOk , className }){
const [ visible , setVisible ] = useState(false);
return(
<React.Fragment>
<ALink className={className} onClick={()=>setVisible(true)}>离开团队</ALink>
<Modals visible={visible} okText={"确定"} cancelText={"取消"} onCancel={()=>setVisible(false)} onOk={()=>onOk(teamID)}>
<p className="font-16 edu-txt-center">确定要离开当前团队吗</p>
</Modals>
</React.Fragment>
)
}
export default LeaveTeam;