<commit_before>import {ThemeProvider, withTheme} from 'styled-components'
import _merge from 'lodash/merge'
import {ToccoTheme} from 'tocco-theme'
import {Typography} from 'tocco-ui'
import React from 'react'
import PropTypes from 'prop-types'

class ThemeWrapper extends React.PureComponent {
  render() {
    const {theme, appTheme} = this.props
    const mergedTheme = _merge({}, theme || ToccoTheme, appTheme)

    return <ThemeProvider theme={mergedTheme}>
      <React.Fragment>
        {!theme && <Typography.InjectFont />}
        {this.props.children}
      </React.Fragment>
    </ThemeProvider>
  }
}

ThemeWrapper.propTypes = {<commit_msg>refactor(app-extensions): specify ToccoTheme as default<commit_after>import {ThemeProvider, withTheme} from 'styled-components'
import _merge from 'lodash/merge'
import {ToccoTheme} from 'tocco-theme'
import {Typography} from 'tocco-ui'
import React from 'react'
import PropTypes from 'prop-types'

class ThemeWrapper extends React.PureComponent {
  render() {
    const {theme, appTheme} = this.props
    const mergedTheme = _merge({}, theme, appTheme)

    return <ThemeProvider theme={mergedTheme}>
      <React.Fragment>
        {!theme && <Typography.InjectFont />}
        {this.props.children}
      </React.Fragment>
    </ThemeProvider>
  }
}

ThemeWrapper.defaultProps = {
  theme: ToccoTheme
}

ThemeWrapper.propTypes = {
{'fraction_non_alphanumeric': 0.1193058568329718, 'fraction_numerical': 0.0, 'mean_word_length': 4.164179104477612, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '1786981', 'n_tokens_mistral': 430, 'n_tokens_neox': 422, 'n_words': 106}