import * as React from 'react'; import styles from '@patternfly/react-styles/css/components/Select/select'; import { css } from '@patternfly/react-styles'; import { SelectConsumer, SelectVariant } from './selectConstants'; export interface SelectGroupProps extends React.HTMLProps { /** Checkboxes within group. Must be React.ReactElement[] */ children?: React.ReactNode; /** Additional classes added to the CheckboxSelectGroup control */ className?: string; /** Group label */ label?: string; /** ID for title label */ titleId?: string; } export const SelectGroup: React.FunctionComponent = ({ children = [], className = '', label = '', titleId = '', ...props }: SelectGroupProps) => ( {({ variant }) => (
{label}
{variant === SelectVariant.checkbox ? children :

{children}

}
)} ); SelectGroup.displayName = 'SelectGroup';