提交 a4607d19 编写于 作者: Y yewenwen3

feat: add range

上级 976c3d82
......@@ -127,6 +127,16 @@
"sort": 2,
"show": true,
"author": "vickyYe"
},
{
"version": "1.0.0",
"name": "Range",
"type": "component",
"cName": "区间选择器",
"desc": "滑动输入条,用于在给定的范围内选择一个值。",
"sort": 3,
"show": true,
"author": "vickyYe"
}
]
},
......
import React from 'react'
import { Range } from './range'
const RangeDemo = () => {
return (
<>
<div className="demo">
<h2>基础用法</h2>
<Range></Range>
</div>
</>
)
}
export default RangeDemo
# Range组件
### 介绍
基于 xxxxxxx
### 安装
## 代码演示
### 基础用法1
## API
### Props
| 参数 | 说明 | 类型 | 默认值 |
|--------------|----------------------------------|--------|------------------|
| name | 图标名称或图片链接 | String | - |
| color | 图标颜色 | String | - |
| size | 图标大小,如 '20px' '2em' '2rem' | String | - |
| class-prefix | 类名前缀,用于使用自定义图标 | String | 'nutui-iconfont' |
| tag | HTML 标签 | String | 'i' |
### Events
| 事件名 | 说明 | 回调参数 |
|--------|----------------|--------------|
| click | 点击图标时触发 | event: Event |
import { Range } from './range'
export default Range
import React, { FunctionComponent } from 'react'
import './range.scss'
export interface RangeProps {}
const defaultProps = {} as RangeProps
export const Range: FunctionComponent<Partial<RangeProps> & React.HTMLAttributes<HTMLDivElement>> =
(props) => {
const { children } = { ...defaultProps, ...props }
return <div className="nut-range">Range</div>
}
Range.defaultProps = defaultProps
Range.displayName = 'NutRange'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册