【发布时间】:2021-04-30 14:44:29
【问题描述】:
const TextInfoShiftBox: FunctionComponent<TextInfoShiftBoxInterface> = () => {
const [stateArrow, setStateArrow] = useState(false);
const handlerCollapseInfo = (e) => {
e.preventDefault();
setStateArrow(!stateArrow)
};
return (
<AreaContainer>
<div className='info-shift-box'>
<Icon onClick={(e) => handlerCollapseInfo(e)} className='arrow-icon' size='20px' icon={stateArrow ? "be-110" : "be-030"} />
<h3>Info</h3><Icon className='warm-icon' size='24px' icon={"bd-150"} />
</div>
<div>
<b>text</b>
<LinkContainer>
<Link className='ref' text=' acá.' onClick="www.google.com.ar" type='red' />
</ LinkContainer>
<span className='info-shift-box-client'>
other text.
{stateArrow ? ' text' : ''}
</span>
</div>
</ AreaContainer>
)
【问题讨论】:
-
这能回答你的问题吗? React-Router External link
标签: reactjs