Reputation: 1
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>
)
Upvotes: 0
Views: 298
Reputation: 4150
onClick="www.google.com.ar"
The above is returning a string, if you want the link to go somewhere you need to use the to
method:
<Link className='ref' text=' acá.' to="https://www.google.com.ar" type='red' />
Upvotes: 1