@carbon/react
Version:
React components for the Carbon Design System
101 lines (100 loc) • 3.39 kB
TypeScript
/**
* Copyright IBM Corp. 2016, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import PropTypes from 'prop-types';
import React from 'react';
export interface TableSelectRowProps {
/**
* Specify a label to be read by screen readers on the containing textbox
* node
*/
['aria-label']?: string;
/**
* @deprecated please use `aria-label` instead.
* Specify a label to be read by screen readers on the containing textbox
* node
*/
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: deprecatedAriaLabel, ["aria-label"]: ariaLabel, checked, id, name, onSelect, onChange, disabled, radio, className, }: TableSelectRowProps): import("react/jsx-runtime").JSX.Element;
propTypes: {
/**
* Specify the aria label for the underlying input control
*/
"aria-label": PropTypes.Requireable<string>;
/**
* Deprecated, please use `aria-label` instead.
* Specify the aria label for the underlying input control
*/
ariaLabel: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
/**
* Specify whether this row is selected, or not
*/
checked: PropTypes.Requireable<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;