import Button from '../../button';
import Rating from '..';
import React from 'react';
import ReactDOM from 'react-dom';
class Preview extends React.Component {
    constructor(props) {
        super(props);
        this.state = { isPreview: false };
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(Button, { type: "primary", onClick: () => this.setState({ isPreview: !this.state.isPreview }) }, "\u5207\u6362\u9884\u89C8"),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Rating, { defaultValue: 3.5, 
                // @ts-ignore
                isPreview: this.state.isPreview, renderPreview: value => `Rating: ${value}` })));
    }
}
ReactDOM.render(React.createElement(Preview, null), document.getElementById('rating-demo-7'));
