<commit_before>import React, {Component} from 'react';

import RaisedButton from 'src/RaisedButton';
import DownloadField from 'src/DownloadField';
import Widget from 'src/Widget';
import WidgetHeader from 'src/WidgetHeader';
import Theme from 'src/Theme';

import PropTypeDescTable from 'components/PropTypeDescTable';
import DownloadFieldDoc from 'assets/propTypes/DownloadField.json';

import 'sass/containers/app/modules/fields/DownloadFieldExamples.scss';

export default class DownloadFieldExamples extends Component {

    constructor(props) {

        super(props);

        this.download = ::this.download;

    }

    download() {
        this.refs.downloadField.download();
    }

    render() {

        const url = 'https://nodejs.org/dist/v9.0.0/node-v9.0.0.pkg';

        return (
            <div className="example download-field-examples">

                <h2 className="example-title">DownloadField</h2>

                <p>
                    <span>DownloadField</span> allow users to download a file.
                </p>

                <h2 className="example-title">Examples</h2>

                <Widget>

                    <WidgetHeader className="example-header"
                                  title="Basic"/>

                    <div className="widget-content">
                        <div className="example-content">

                            <div className="examples-wrapper">

                                <DownloadField ref="downloadField"
                                               url={url}
                                               onLoad={(e, innerText) => {
                                                   console.log(e, innerText);
                                               }}/>

                                <RaisedButton value="Download NodeJs"
                                              theme={Theme.PRIMARY}
                                              onTouchTap={this.download}/>

                            </div>

                        </div>
                    </div>

                </Widget>

                <h2 className="example-title">Properties</h2>

                <PropTypeDescTable data={DownloadFieldDoc}/>

            </div>
        );
    }
};<commit_msg>update DownloadField examples<commit_after>import React, {Component} from 'react';

import RaisedButton from 'src/RaisedButton';
import DownloadField from 'src/DownloadField';
import Widget from 'src/Widget';
import WidgetHeader from 'src/WidgetHeader';

import PropTypeDescTable from 'components/PropTypeDescTable';
import doc from 'assets/propTypes/DownloadField.json';

import 'sass/containers/app/modules/fields/DownloadFieldExamples.scss';

export default class DownloadFieldExamples extends Component {

    constructor(props) {

        super(props);

        this.download = ::this.download;

    }

    download() {
        this.refs.downloadField.download();
    }

    render() {

        const url = 'https://nodejs.org/dist/v9.0.0/node-v9.0.0.pkg';

        return (
            <div className="example download-field-examples">

                <h2 className="example-title">DownloadField</h2>

                <p>
                    <span>DownloadField</span> allow users to download a file.
                </p>

                <h2 className="example-title">Examples</h2>

                <Widget>

                    <WidgetHeader className="example-header"
                                  title="Basic"/>

                    <div className="widget-content">
                        <div className="example-content">

                            <div className="examples-wrapper">

                                <DownloadField ref="downloadField"
                                               url={url}
                                               onLoad={(e, innerText) => {
                                                   console.log(e, innerText);
                                               }}/>

                                <RaisedButton value="Download NodeJs"
                                              theme={RaisedButton.Theme.PRIMARY}
                                              onTouchTap={this.download}/>

                            </div>

                        </div>
                    </div>

                </Widget>

                <h2 className="example-title">Properties</h2>

                <PropTypeDescTable data={doc}/>

            </div>
        );
    }
};
{'fraction_non_alphanumeric': 0.1025355871886121, 'fraction_numerical': 0.005338078291814947, 'mean_word_length': 1.274658573596358, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 53, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 65, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5935376', 'n_tokens_mistral': 1078, 'n_tokens_neox': 980, 'n_words': 196}