<commit_before>/** @jsx h */
import { h } from 'preact';
import classNames from 'classnames';

import './style.scss';
import Align from '../../components/Align';
import ButtonClose from '../../components/ButtonClose';

export default function Overlay({ children, onClose, opaque }) {
  return (
    <div
      className={classNames('overlay', opaque && 'mod-opaque')}
      onClick={onClose}
    >
      <Align type="top-right">
        <ButtonClose onClick={onClose} />
      </Align>
      <div className="overlay-text">
        {children}
      </div>
    </div>
  );
}<commit_msg>overlay: without onClose, hide close button<commit_after>/** @jsx h */
import { h } from 'preact';
import classNames from 'classnames';

import './style.scss';
import Align from '../../components/Align';
import ButtonClose from '../../components/ButtonClose';

export default function Overlay({ children, onClose, opaque }) {
  return (
    <div
      className={classNames('overlay', opaque && 'mod-opaque')}
      onClick={onClose}
    >
      {onClose && (
        <Align type="top-right">
          <ButtonClose onClick={onClose} />
        </Align>
      )}
      <div className="overlay-text">
        {children}
      </div>
    </div>
  );
}
{'fraction_non_alphanumeric': 0.170316301703163, 'fraction_numerical': 0.0, 'mean_word_length': 2.7621951219512195, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '5372866', 'n_tokens_mistral': 366, 'n_tokens_neox': 365, 'n_words': 94}