<commit_before>/* eslint-disable react/no-danger */

import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import Playground from 'component-playground'
import markdown from '../helpers/markdown'

const Example = ({ code, collapsible, componentName, description, expanded, inline }) =>
  <div className={`component-example component-example--${componentName}`}>
    {description &&
      <div dangerouslySetInnerHTML={{ __html: markdown.render(description) }} />
    }

    <Playground
      codeText={code}
      collapsableCode={collapsible}
      initiallyExpanded={expanded}
      noRender={inline}
      scope={{ React, ReactDOM }}
      theme="material"
    />
  </div>

Example.propTypes = {
  code: PropTypes.string.isRequired,
  collapsible: PropTypes.bool,
  componentName: PropTypes.string.isRequired,
  description: PropTypes.string,<commit_msg>Adds the classnames lib to examples<commit_after>/* eslint-disable react/no-danger */

import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import Playground from 'component-playground'
import classNames from 'classnames'
import markdown from '../helpers/markdown'

const Example = ({ code, collapsible, componentName, description, expanded, inline }) =>
  <div className={`component-example component-example--${componentName}`}>
    {description &&
      <div dangerouslySetInnerHTML={{ __html: markdown.render(description) }} />
    }

    <Playground
      codeText={code}
      collapsableCode={collapsible}
      initiallyExpanded={expanded}
      noRender={inline}
      scope={{ React, ReactDOM, classNames }}
      theme="material"
    />
  </div>

Example.propTypes = {
  code: PropTypes.string.isRequired,
  collapsible: PropTypes.bool,
  componentName: PropTypes.string.isRequired,
  description: PropTypes.string,
{'fraction_non_alphanumeric': 0.12285407725321888, 'fraction_numerical': 0.0, 'mean_word_length': 4.28328611898017, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5154254', 'n_tokens_mistral': 524, 'n_tokens_neox': 537, 'n_words': 125}