import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js"; import type CheckBox from "./CheckBox.js"; import Label from "./Label.js"; import Icon from "./Icon.js"; import accept from "@ui5/webcomponents-icons/dist/accept.js"; import complete from "@ui5/webcomponents-icons/dist/complete.js"; import border from "@ui5/webcomponents-icons/dist/border.js"; import triState from "@ui5/webcomponents-icons/dist/tri-state.js"; export default function CheckBoxTemplate(this: CheckBox) { return (
{this.isDisplayOnly ?
:
{this.isCompletelyChecked &&
} {this.accInfo.role === "checkbox" && } {this.text && } {this.hasValueState && {this.valueStateText} }
); } function displayOnlyIcon(this: CheckBox) { if (this.isCompletelyChecked) { return complete; } if (this.checked && this.indeterminate) { return triState; } return border; }