You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
757 B

import React from 'react';
import { PropTypes } from 'react';
9 years ago
import RcRate from 'rc-rate';
import Icon from '../icon';
9 years ago
export interface RateProps {
prefixCls?: string;
count?: number;
value?: number;
defaultValue?: number;
allowHalf?: boolean;
disabled?: boolean;
onChange?: (value: number) => any;
onHoverChange?: (value: number) => any;
charactor?: React.ReactNode;
className?: string;
style?: React.CSSProperties;
}
export default class Rate extends React.Component<RateProps, any> {
9 years ago
static propTypes = {
prefixCls: PropTypes.string,
charactor: PropTypes.node,
9 years ago
};
static defaultProps = {
9 years ago
prefixCls: 'ant-rate',
charactor: <Icon type="star" />,
9 years ago
};
render() {
return <RcRate {...this.props} />;
}
}