<commit_before>import React, { PropTypes } from 'react';
import defaultPropTypes from './defaultPropTypes';
import StackedNotification from './stackedNotification';

/**
 * The notification list does not have any state, so use a
 * pure function here. It just needs to return the stacked array
 * of notification components.
 */
const NotificationStack = props => (
  <div className="notification-list">
    {props.notifications.map((notification, index) => {
      const dismissAfter = notification.dismissAfter || props.dismissAfter || 2000;
      const lastNotificationDismissAfter = 300;
      const isLast = index === 0 && props.notifications.length === 1;
      return (
        <StackedNotification
          {...notification}
          key={notification.key}
          isLast={isLast}
          action={notification.action || props.action}
          dismissAfter={isLast ? dismissAfter : dismissAfter + (index * 1000)}
          onClick={() => props.onDismiss(notification)}
          onDismiss={() => setTimeout(() => {
            setTimeout(props.onDismiss.bind(this, notification), lastNotificationDismissAfter);
          }, dismissAfter)}
          style={{
            bar: {
              bottom: `${2 + index * 4}rem`,
            }
          }}
        />
      );
    })}
  </div>
);

NotificationStack.propTypes = {
  notifications: PropTypes.array.isRequired,
  onDismiss: PropTypes.func
};

export default NotificationStack;
<commit_msg>fix style was not passed from NotificationStack to Notification<commit_after>import React, { PropTypes } from 'react';
import defaultPropTypes from './defaultPropTypes';
import StackedNotification from './stackedNotification';

/**
 * The notification list does not have any state, so use a
 * pure function here. It just needs to return the stacked array
 * of notification components.
 */
const NotificationStack = props => (
  <div className="notification-list">
    {props.notifications.map((notification, index) => {
      const dismissAfter = notification.dismissAfter || props.dismissAfter || 2000;
      const lastNotificationDismissAfter = 300;
      const isLast = index === 0 && props.notifications.length === 1;
      return (
        <StackedNotification
          {...notification}
          key={notification.key}
          isLast={isLast}
          action={notification.action || props.action}
          dismissAfter={isLast ? dismissAfter : dismissAfter + (index * 1000)}
          onClick={() => props.onDismiss(notification)}
          onDismiss={() => setTimeout(() => {
            setTimeout(props.onDismiss.bind(this, notification), lastNotificationDismissAfter);
          }, dismissAfter)}
          style={notification.style !== null ? notification.style : {
            bar: {
              bottom: `${2 + index * 4}rem`,
            }
          }}
        />
      );
    })}
  </div>
);

NotificationStack.propTypes = {
  notifications: PropTypes.array.isRequired,
  onDismiss: PropTypes.func
};

export default NotificationStack;

{'fraction_non_alphanumeric': 0.12023848956608148, 'fraction_numerical': 0.009937065253395164, 'mean_word_length': 2.8276299112801015, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '4520089', 'n_tokens_mistral': 783, 'n_tokens_neox': 759, 'n_words': 198}