<commit_before>// @flow
import React from "react";
import styled from "styled-components";
import { withLayout } from "./LayoutProvider";
import { horizontalAlign, verticalAlign } from '../utils/flex';
import passOn from "../utils/passOn";

const containerDirectionError = "Container direction must be `horizontal` or `vertical`";

const directionToFlex = direction => {
  if (direction === "vertical") {
    return "column";
  } else if (direction === "horizontal") {
    return "row";
  }
  throw Error(containerDirectionError);
};

const Wrapper = styled.div`
  display: flex;
  max-width: 100%;
  ${props => props.grow && `flex-grow: 1;`}
  ${props => props.height && `height: ${props.height};`}
  ${props => props.direction && `flex-direction: ${directionToFlex(props.direction)}`}
  ${props => props.hAlign && horizontalAlign(props.hAlign, props.direction)}
  ${props => props.vAlign && verticalAlign(props.vAlign, props.direction)}
`;

Wrapper.defaultProps = {<commit_msg>add min-height to Container<commit_after>// @flow
import React from "react";
import styled from "styled-components";
import { withLayout } from "./LayoutProvider";
import { horizontalAlign, verticalAlign } from '../utils/flex';
import passOn from "../utils/passOn";

const containerDirectionError = "Container direction must be `horizontal` or `vertical`";

const directionToFlex = direction => {
  if (direction === "vertical") {
    return "column";
  } else if (direction === "horizontal") {
    return "row";
  }
  throw Error(containerDirectionError);
};

const Wrapper = styled.div`
  display: flex;
  max-width: 100%;
  min-height: 1px;
  ${props => props.grow && `flex-grow: 1;`}
  ${props => props.height && `height: ${props.height};`}
  ${props => props.direction && `flex-direction: ${directionToFlex(props.direction)}`}
  ${props => props.hAlign && horizontalAlign(props.hAlign, props.direction)}
  ${props => props.vAlign && verticalAlign(props.vAlign, props.direction)}
`;

Wrapper.defaultProps = {
{'fraction_non_alphanumeric': 0.167754897036665, 'fraction_numerical': 0.0045203415369161224, 'mean_word_length': 4.790697674418604, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3598479', 'n_tokens_mistral': 596, 'n_tokens_neox': 582, 'n_words': 157}