<commit_before>import * as React from 'react'
import { Octicon, OcticonSymbol } from '../octicons'

interface IDialogHeaderProps {
  readonly title: string
  readonly dismissable: boolean
  readonly onDismissed?: () => void
}

export class DialogHeader extends React.Component<IDialogHeaderProps, any> {

  private onCloseButtonClick = (e: React.MouseEvent<HTMLButtonElement>) => {
    if (this.props.onDismissed) {
      this.props.onDismissed()
    }
  }

  private renderCloseButton() {
    return (
      <button onClick={this.onCloseButtonClick}>
        <Octicon symbol={OcticonSymbol.x} />
      </button>
    )
  }

  public render() {
    const closeButton = this.props.dismissable
      ? this.renderCloseButton()
      : null

    return (
      <div className='dialog-title'>
        <h1>{this.props.title}</h1>
        {closeButton}
      </div>
    )
  }
}<commit_msg>Use header element instead of class<commit_after>import * as React from 'react'
import { Octicon, OcticonSymbol } from '../octicons'

interface IDialogHeaderProps {
  readonly title: string
  readonly dismissable: boolean
  readonly onDismissed?: () => void
}

export class DialogHeader extends React.Component<IDialogHeaderProps, any> {

  private onCloseButtonClick = (e: React.MouseEvent<HTMLButtonElement>) => {
    if (this.props.onDismissed) {
      this.props.onDismissed()
    }
  }

  private renderCloseButton() {
    return (
      <button onClick={this.onCloseButtonClick}>
        <Octicon symbol={OcticonSymbol.x} />
      </button>
    )
  }

  public render() {
    const closeButton = this.props.dismissable
      ? this.renderCloseButton()
      : null

    return (
      <header>
        <h1>{this.props.title}</h1>
        {closeButton}
      </header>
    )
  }
}
{'fraction_non_alphanumeric': 0.11884550084889643, 'fraction_numerical': 0.0022637238256932655, 'mean_word_length': 2.981981981981982, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, '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': '1435264', 'n_tokens_mistral': 545, 'n_tokens_neox': 533, 'n_words': 114}