【发布时间】:2020-08-10 15:29:06
【问题描述】:
您好,有没有办法在我的反应选择按钮中设置自定义宽度? 如果我可以使用引导程序来做到这一点,我希望它可以响应,但如果不是也可以。
这是我的代码:
import Select, { components } from 'react-select';
export default class AccomodationType extends Component {
render() {
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' }
]
return(
<div>
<Select
options= {options}
isClearable
isSearchable
name="color"
/>
</div>
)
}
}
【问题讨论】:
标签: css reactjs styles react-select