<commit_before>import Webiny from 'Webiny';
import styles from './styles.css';

class Button extends Webiny.Ui.Component {

    constructor(props) {
        super(props);

        this.state = {
            enabled: true
        };
    }

    disable() {
        this.setState({enabled: false});
    }

    enable() {
        this.setState({enabled: true});
    }
}

Button.defaultProps = {
    size: 'normal',
    type: 'default',
    align: 'normal',
    icon: null,
    className: null,
    style: null,
    label: null,
    onClick: _.noop,
    tooltip: null,
    renderer() {
        const props = _.clone(this.props);
        const {Tooltip, Icon, styles} = props;

        if (props.disabled || !this.state.enabled) {
            props['disabled'] = true;
        }

        const sizeClasses = {
            normal: '',
            large: styles.btnLarge,
            //small: 'btn-sm' // sven: this option doesn't exist in css
        };

        const alignClasses = {
            normal: '',
            left: 'pull-left',<commit_msg>Added disabled to default props.<commit_after>import Webiny from 'Webiny';
import styles from './styles.css';

class Button extends Webiny.Ui.Component {

    constructor(props) {
        super(props);

        this.state = {
            enabled: true
        };
    }

    disable() {
        this.setState({enabled: false});
    }

    enable() {
        this.setState({enabled: true});
    }
}

Button.defaultProps = {
    size: 'normal',
    type: 'default',
    align: 'normal',
    icon: null,
    className: null,
    style: null,
    label: null,
    onClick: _.noop,
    tooltip: null,
    disabled: false,
    renderer() {
        const props = _.clone(this.props);
        const {Tooltip, Icon, styles} = props;

        if (props.disabled || !this.state.enabled) {
            props['disabled'] = true;
        }

        const sizeClasses = {
            normal: '',
            large: styles.btnLarge,
            //small: 'btn-sm' // sven: this option doesn't exist in css
        };

        const alignClasses = {
            normal: '',
            left: 'pull-left',
{'fraction_non_alphanumeric': 0.13474178403755868, 'fraction_numerical': 0.0, 'mean_word_length': 1.7819843342036554, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3295328', 'n_tokens_mistral': 625, 'n_tokens_neox': 618, 'n_words': 155}