@itwin/core-react
Version:
A react component library of iTwin.js UI general purpose components
44 lines • 2.12 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module CheckListBox
*/
import "./CheckListBox.scss";
import classnames from "classnames";
import * as React from "react";
import { Checkbox } from "@itwin/itwinui-react";
/** Item with a checkbox added to a [[CheckListBox]].
* @public
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/list iTwinUI list} instead.
*/
// eslint-disable-next-line @typescript-eslint/no-deprecated
export class CheckListBoxItem extends React.PureComponent {
render() {
const className = classnames("core-chk-listboxitem-checkbox", this.props.className);
return (React.createElement("li", null,
React.createElement(Checkbox, { checked: this.props.checked, disabled: this.props.disabled, label: this.props.label, onClick: this.props.onClick, onChange: this.props.onChange, "data-testid": "core-chk-listboxitem-checkbox", wrapperProps: {
className,
style: this.props.style,
} })));
}
}
/** Separator added to a [[CheckListBox]].
* @public
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/list iTwinUI list} instead.
*/
export function CheckListBoxSeparator() {
return React.createElement("div", { className: "core-chk-listbox-separator" });
}
/** React component showing a list of Checkbox items.
* @public
* @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/list iTwinUI list} instead.
*/
export class CheckListBox extends React.PureComponent {
render() {
const className = classnames("core-chk-listbox", this.props.className);
return (React.createElement("ul", { className: className, style: this.props.style }, this.props.children));
}
}
//# sourceMappingURL=CheckListBox.js.map