2016-07-07 20:25:03 +08:00
|
|
|
import * as React from 'react';
|
2016-08-10 09:46:56 +08:00
|
|
|
import { PropTypes } from 'react';
|
2016-03-30 13:20:03 +08:00
|
|
|
import RcRate from 'rc-rate';
|
|
|
|
|
2016-08-10 09:46:56 +08:00
|
|
|
export interface RateProps {
|
|
|
|
prefixCls?: string;
|
|
|
|
count?: number;
|
|
|
|
value?: number;
|
|
|
|
defaultValue?: number;
|
|
|
|
allowHalf?: boolean;
|
|
|
|
disabled?: boolean;
|
|
|
|
onChange?: (value: number) => any;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default class Rate extends React.Component<RateProps, any> {
|
2016-03-30 13:20:03 +08:00
|
|
|
static propTypes = {
|
|
|
|
prefixCls: PropTypes.string,
|
|
|
|
};
|
2016-03-31 14:43:38 +08:00
|
|
|
static defaultProps = {
|
2016-03-30 13:20:03 +08:00
|
|
|
prefixCls: 'ant-rate',
|
|
|
|
};
|
|
|
|
render() {
|
|
|
|
return <RcRate {...this.props} />;
|
|
|
|
}
|
|
|
|
}
|