@_nu/react-select 中文文档教程
@_nu/react-select
English | 简体中文
Install
yarn add @_nu/react-select
- @_nu/react-select: Login only
- @_nu/css-select: UI Just
Custom
/* @components/select/index.js */
import Select from "@_nu/react-select";
// core style
import "@_nu/css-select";
// skin of bootstrap
import "@_nu/css-select/css/skins/default.css";
// custome style
// import './style.css';
// base className of select
Select.defaultProps.classNameBase = "";
export default Select;
Use
import Select from "./components/Select";
const Page=()=>{
return (
<div>
<Select className="_l" onChange={(e)=>{
console.log(e.currentTarget.value);
}}>
<option value="1">large</option>
<option value="2">option2</option>
<option value="3">option3</option>
</Select>
<Select>
<option value="1">default</option>
<option value="2">option2</option>
<option value="3">option3</option>
</Select>
<Select className="_danger">
<option value="1">danger</option>
<option value="2">option2</option>
<option value="3">option3</option>
</Select>
<Select className="_s">
<option value="1">small</option>
<option value="2">option2</option>
<option value="3">option3</option>
</Select>
<Select className="_xs">
<option value="1">x-small</option>
<option value="2">option2</option>
<option value="3">option3</option>
</Select>
</div>
);
};
export default Page;
Or go node_modules/@_nu/react-select/demo
for more detail.
API
Prop | type | Default | Function |
---|---|---|---|
children | string | Array | ' ' | children |
className | string | Array | ' ' | className |
classNameDefault | string | Array | ' ' | default className |
disabled | boolean | false | disabled status of button |
ComponentWrap | string | func | object | 'label' | wrapper |
More
更多
你可能也喜欢
- 2d-transformation-solver 中文文档教程
- @1backend/ng-client 中文文档教程
- @8area8/domstrict 中文文档教程
- @9softstudio/react-datepicker 中文文档教程
- @a11ycore/reporter 中文文档教程
- @a8k/changelog 中文文档教程
- @a9g/plop-generator-react-atomic-component 中文文档教程
- @aaditya1978/ckeditor5-custom-build 中文文档教程
- @aamod2017/sigin 中文文档教程
- @aarhus-university/au-designsystem-delphinus 中文文档教程