@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
76 lines (75 loc) • 2.69 kB
TypeScript
/**
* MSKCC DSM 2021, 2024
*/
import PropTypes from 'prop-types';
import React from 'react';
export interface CheckboxGroupProps {
children?: React.ReactNode;
className?: string;
helperText?: React.ReactNode;
invalid?: boolean;
invalidText?: React.ReactNode;
legendId?: React.ReactNode;
legendText?: React.ReactNode;
orientation?: 'horizontal' | 'vertical';
readOnly?: boolean;
size?: 'default' | 'md' | 'lg';
warn?: boolean;
warnText?: React.ReactNode;
[key: string]: any;
disableFocus?: boolean;
}
declare function CheckboxGroup({ children, className, helperText, invalid, invalidText, legendId, legendText, orientation, readOnly, size, warn, warnText, disableFocus, ...rest }: CheckboxGroupProps): JSX.Element;
declare namespace CheckboxGroup {
var propTypes: {
/**
* Provide the children form elements to be rendered inside of the `<fieldset>`
*/
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Provide a custom className to be applied to the containing `<fieldset>` node
*/
className: PropTypes.Requireable<string>;
/**
* Specify whether the form group is currently in warning state
*/
/**
* Provide the text that is displayed when the form group is in warning state
*/
disableFocus: PropTypes.Requireable<boolean>;
/**
* Provide text for the form group for additional help
*/
helperText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Specify whether the form group is currently invalid
*/
invalid: PropTypes.Requireable<boolean>;
/**
* Provide the text that is displayed when the form group is in an invalid state
*/
invalidText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Provide id for the fieldset <legend> which corresponds to the fieldset
* `aria-labelledby`
*/
legendId: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
* Provide the text to be rendered inside of the fieldset `<legend>`
*/
legendText: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
/**
* Specify the orientation of them items
*/
orientation: PropTypes.Requireable<string>;
/**
* Whether the CheckboxGroup should be read-only
*/
readOnly: PropTypes.Requireable<boolean>;
/**
* Set the size of the checkbox
*/
size: PropTypes.Requireable<string>;
};
}
export default CheckboxGroup;