export const NavSearch = styled.input.attrs({
type: 'text', placeholder: '搜索'
})`
width: 240px;
height: 38px;
border: none;
border-radius: 19px;
background: #eee;
padding: 0 40px 0 20px;
box-sizing: border-box;
margin-top: 9px;
outline: none;
transition: all 0.2s ease-out;
&::placeholder {
color: #999;
}
&.focused {
width: 320px;
}
`;像老师这样写感觉好麻烦,这样写感觉可以省去使用CSSTransition,还是使用react-transition-group对性能有所提升吗?