【发布时间】:2021-08-01 11:32:54
【问题描述】:
我正在使用带有样式组件的 react-select,它正在工作,但我想使用双宏来使用顺风类。
import tw from 'twin.macro';
import styled from 'styled-components';
import Select from 'react-select';
export const StyledReactSelect = styled(Select)(() => [
`
.Select__control {
height: 40px;
width: 100%;
border: 1px solid #a1a1a1;
border-radius: 0;
cursor: pointer;
}
.Select__control:hover {
border-color: #a1a1a1;
}
.Select__control--is-focused {
box-shadow: 0 0 0 1px black;
outline: none;
}
.Select__indicator-separator {
display: none;
}
.Select__menu {
color: #3c3d3e;
}
`,
]);
现在我想将 tw(twin-macro) 与 react-select 类一起使用。谁能帮忙?
【问题讨论】:
标签: reactjs styled-components react-select tailwind-css