packageDocumentation module import "./LabeledToggle.scss" ; import classnames from "classnames" ; import * as React from "react" ; import { ToggleSwitch , ToggleSwitchProps } from "@itwin/itwinui-react" ; public deprecated export interface LabeledToggleProps extends ToggleSwitchProps { /** Text that will be shown next to the Toggle. */ label ? : string ; /** Custom CSS class name for the label */ labelClassName ? : string ; /** Custom CSS Style for the label */ labelStyle ? : React . CSSProperties ; } public deprecated export class LabeledToggle extends React . PureComponent < LabeledToggleProps > { public override render ( ) { const { label , labelClassName , className , style , ... props } = this . props ; return ( < label style = { this . props . style } className = { classnames ( "core-inputs-labeled-toggle" , this . props . disabled && "uicore-disabled" , this . props . className ) } > < ToggleSwitch className = { className } style = { style } { ... props } /> { label && < div className = { classnames ( "uicore-label" , labelClassName ) } > { label } < /div>} < /label>); } }