<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import withStyles from 'material-ui/styles/withStyles';
import Button from 'material-ui/Button';
import Dialog from 'material-ui/Dialog/Dialog';
import DialogActions from 'material-ui/Dialog/DialogActions';
import DialogContent from 'material-ui/Dialog/DialogContent';

const dialogWidth = 310;
const styles = {
  dialogRoot: {
    minWidth: dialogWidth,
  },
  dialog: {
    width: dialogWidth,

    '&:first-child': {
      padding: 0,
    },
  },
  dialogActions: {
    '&:first-child': {
      marginRight: 'auto',
    },
  },
};

const ModalDialog = ({
  children,
  classes,
  onAccept,
  onDismiss,
  onClear,
  okLabel,
  cancelLabel,
  clearLabel,
  dialogContentClassName,
  clearable,
  ...other
}) => (
  <Dialog onClose={onDismiss} classes={{ paper: classes.dialogRoot }} {...other}>
    <DialogContent className={classnames(classes.dialog, dialogContentClassName)}>
      { children }
    </DialogContent>

    <DialogActions
      classes={{
        action: clearable && classes.dialogActions,
      }}
    >

      { clearable &&
        <Button
          color="primary"
          onClick={onClear}
          aria-label={clearLabel}
        >
          { clearLabel }
        </Button>
      }
      <Button
        color="primary"
        onClick={onDismiss}
        aria-label={cancelLabel}
      >
        { cancelLabel }
      </Button>

      <Button
        color="primary"
        onClick={onAccept}
        aria-label={okLabel}
      >
        { okLabel }
      </Button>
    </DialogActions>
  </Dialog><commit_msg>fix DialogActions align when clearable is set to true in IE11<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import withStyles from 'material-ui/styles/withStyles';
import Button from 'material-ui/Button';
import Dialog from 'material-ui/Dialog/Dialog';
import DialogActions from 'material-ui/Dialog/DialogActions';
import DialogContent from 'material-ui/Dialog/DialogContent';

const dialogWidth = 310;
const styles = {
  dialogRoot: {
    minWidth: dialogWidth,
  },
  dialog: {
    width: dialogWidth,

    '&:first-child': {
      padding: 0,
    },
  },
  dialogActions: {
    // set justifyContent to default value to fix IE11 layout bug
    justifyContent: 'flex-start',
  },
  dialogAction: {
    '&:first-child': {
      marginRight: 'auto',
    },
  },
};

const ModalDialog = ({
  children,
  classes,
  onAccept,
  onDismiss,
  onClear,
  okLabel,
  cancelLabel,
  clearLabel,
  dialogContentClassName,
  clearable,
  ...other
}) => (
  <Dialog onClose={onDismiss} classes={{ paper: classes.dialogRoot }} {...other}>
    <DialogContent className={classnames(classes.dialog, dialogContentClassName)}>
      { children }
    </DialogContent>

    <DialogActions
      classes={{
        root: clearable && classes.dialogActions,
        action: clearable && classes.dialogAction,
      }}
    >

      { clearable &&
        <Button
          color="primary"
          onClick={onClear}
          aria-label={clearLabel}
        >
          { clearLabel }
        </Button>
      }
      <Button
        color="primary"
        onClick={onDismiss}
        aria-label={cancelLabel}
      >
        { cancelLabel }
      </Button>

      <Button
        color="primary"
        onClick={onAccept}
        aria-label={okLabel}
      >
        { okLabel }
      </Button>
    </DialogActions>
  </Dialog>
{'fraction_non_alphanumeric': 0.12514156285390712, 'fraction_numerical': 0.0033975084937712344, 'mean_word_length': 2.5294705294705295, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, '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': '3374210', 'n_tokens_mistral': 1047, 'n_tokens_neox': 1045, 'n_words': 225}