@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
86 lines (85 loc) • 2.69 kB
TypeScript
/**
* MSKCC DSM 2021, 2023
*/
import PropTypes from 'prop-types';
import React from 'react';
export interface TableSelectRowProps {
/**
* Specify the aria label for the underlying input control
*/
ariaLabel: string;
/**
* Specify whether this row is selected, or not
*/
checked: boolean;
/**
* The CSS class names of the cell that wraps the underlying input control
*/
className?: string;
/**
* Specify whether the control is disabled
*/
disabled?: boolean;
/**
* Provide an `id` for the underlying input control
*/
id: string;
/**
* Provide a `name` for the underlying input control
*/
name: string;
/**
* Provide an optional hook that is called each time the input is updated
*/
onChange?: (value: boolean, name: string, event: React.ChangeEvent<HTMLInputElement>) => void;
/**
* Provide a handler to listen to when a user initiates a selection request
*/
onSelect: React.MouseEventHandler<HTMLInputElement>;
/**
* Specify whether the control should be a radio button or inline checkbox
*/
radio?: boolean;
}
declare const TableSelectRow: {
({ ariaLabel, checked, id, name, onSelect, onChange, disabled, radio, className, }: TableSelectRowProps): JSX.Element;
propTypes: {
/**
* Specify the aria label for the underlying input control
*/
ariaLabel: PropTypes.Validator<string>;
/**
* Specify whether this row is selected, or not
*/
checked: PropTypes.Validator<boolean>;
/**
* The CSS class names of the cell that wraps the underlying input control
*/
className: PropTypes.Requireable<string>;
/**
* Specify whether the control is disabled
*/
disabled: PropTypes.Requireable<boolean>;
/**
* Provide an `id` for the underlying input control
*/
id: PropTypes.Validator<string>;
/**
* Provide a `name` for the underlying input control
*/
name: PropTypes.Validator<string>;
/**
* Provide an optional hook that is called each time the input is updated
*/
onChange: PropTypes.Requireable<(...args: any[]) => any>;
/**
* Provide a handler to listen to when a user initiates a selection request
*/
onSelect: PropTypes.Validator<(...args: any[]) => any>;
/**
* Specify whether the control should be a radio button or inline checkbox
*/
radio: PropTypes.Requireable<boolean>;
};
};
export default TableSelectRow;