{"size": 927, "ext": "js", "max_stars_repo_path": "src/components/Select/OptGroup/OptGroup.js", "max_stars_repo_name": "qonsoll/react-design", "max_stars_repo_stars_event_min_datetime": "2021-01-24T19:05:32.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-25T17:27:50.000Z", "max_issues_repo_path": "src/components/Select/OptGroup/OptGroup.js", "max_issues_repo_name": "qonsoll/react-design", "max_issues_repo_issues_event_min_datetime": "2022-01-28T12:50:59.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-28T12:50:59.000Z", "max_forks_repo_path": "src/components/Select/OptGroup/OptGroup.js", "max_forks_repo_name": "qonsoll/react-design", "max_forks_repo_forks_event_min_datetime": "2021-07-21T11:56:57.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-21T11:56:57.000Z"}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 18.1764705882, "max_line_length": 67, "alphanum_fraction": 0.6677454153}
import React from 'react'
import PropTypes from 'prop-types'
import { Select as AntdSelect } from 'antd'
import styled from 'styled-components'
import {
  compose,
  space,
  color,
  typography,
  layout,
  flexbox,
  background,
  border,
  position,
  shadow,
  system
} from 'styled-system'

/** FIXME component doesn`t work with styled-component */
const StyledOptGroup = styled(AntdSelect.OptGroup)(
  compose(
    space,
    color,
    typography,
    layout,
    flexbox,
    background,
    border,
    position,
    shadow,
    system({
      whiteSpace: true,
      cursor: true,
      wordBreak: true,
      zoom: true,
      transform: true,
      transition: true
    })
  )
)

const OptGroup = (props) => <StyledOptGroup {...props} />

OptGroup.isSelectOptGroup = true
OptGroup.propTypes = {
  key: PropTypes.string,
  label: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
}

export default OptGroup
