<commit_before>/**
 * LoadingOverlay
 *
 * Wrap your component in this and set active={true/false}.
 * react transition group will handle the fade of the overlay portion.
 * apply any classnames you need as normal with className prop.

  <LoadingOverlay active={true} text='Saving...'>my children</LoadingOverlay>
 */
import React, { Children } from 'react'
import ReactCSSTransitionGroup from 'react/lib/ReactCSSTransitionGroup'
import styled, { keyframes } from 'styled-components'

const FirstChild = props => Children.toArray(props.children)[0] || null

class LoadingOverlayWrapper extends React.Component {
  render () {
    const {
      active,
      animate,
      spinner
    } = this.props

    let loadNode = active && <LoadingOverlay key='the_dimmer' {...this.props} />
    if (animate || spinner) {
      loadNode = (
        <ReactCSSTransitionGroup
          transitionName='_loading-overlay-transition'
          transitionAppear
          transitionEnterTimeout={500}<commit_msg>adjusted doc<commit_after>/**
 * LoadingOverlay
 *
 * Set as child component in a container. Toggle state with `active` prop.
 * React transition group will handle the fade of the overlay.
 */

import React, { Children } from 'react'
import ReactCSSTransitionGroup from 'react/lib/ReactCSSTransitionGroup'
import styled, { keyframes } from 'styled-components'

const FirstChild = props => Children.toArray(props.children)[0] || null

class LoadingOverlayWrapper extends React.Component {
  render () {
    const {
      active,
      animate,
      spinner
    } = this.props

    let loadNode = active && <LoadingOverlay key='the_dimmer' {...this.props} />
    if (animate || spinner) {
      loadNode = (
        <ReactCSSTransitionGroup
          transitionName='_loading-overlay-transition'
          transitionAppear
          transitionEnterTimeout={500}
{'fraction_non_alphanumeric': 0.10075431034482758, 'fraction_numerical': 0.004310344827586207, 'mean_word_length': 3.4214285714285713, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '731199', 'n_tokens_mistral': 522, 'n_tokens_neox': 508, 'n_words': 145}