<commit_before>import React, {Component} from 'react'
import {Grid as GridLayoutGrid} from 'glare'
import {mediaQueries, setupMqs} from './mediaQueries'

export class Grid extends Component {
  componentDidMount() {
    const {onResize} = this.props

    setupMqs(onResize)
  }

  render () {
    const {layout, onPoll, value} = this.props

    const children = React.Children.map(this.props.children, (child) => {
      return React.cloneElement(child, {
        onPoll,
        value
      })
    })

    const rows = layout[value.width || 'palm'].length
    const rowHeight = 100 / rows

    return (
      <GridLayoutGrid
        layout={layout[value.width || 'palm']}
        style={{
          gridTemplateRows: `${Math.floor(rowHeight) - .1}vh `.repeat(rows)
        }}>
        {children}
      </GridLayoutGrid>
    )
  }
}<commit_msg>add font size media query support<commit_after>import React, {Component} from 'react'
import {Grid as GridLayoutGrid} from 'glare'
import {mediaQueries, setupMqs} from './mediaQueries'

export class Grid extends Component {
  componentDidMount() {
    const {onResize} = this.props

    setupMqs(onResize)
  }

  render () {
    const {layout, onPoll, value} = this.props

    const children = React.Children.map(this.props.children, (child) => {
      return React.cloneElement(child, {
        onPoll,
        value
      })
    })

    const rows = layout[value.width || 'palm'].length
    const rowHeight = 100 / rows

    return (
      <GridLayoutGrid
        layout={layout[value.width || 'palm']}
        style={{
          gridTemplateRows: `${Math.floor(rowHeight) - .1}vh `.repeat(rows),
          fontSize: mediaQueries[value.width || 'palm'].fontSize
        }}>
        {children}
      </GridLayoutGrid>
    )
  }
}
{'fraction_non_alphanumeric': 0.13077790304396844, 'fraction_numerical': 0.004509582863585118, 'mean_word_length': 2.652263374485597, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5120627', 'n_tokens_mistral': 561, 'n_tokens_neox': 549, 'n_words': 126}