// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. import * as React from 'react'; import { ToggleSwitch, type IToggleEventArgs } from './ToggleSwitch'; /** * This React component renders the application page. */ export class ExampleApp extends React.Component { public render(): React.ReactNode { const appStyle: React.CSSProperties = { backgroundColor: '#ffffff', padding: '20px', borderRadius: '5px', width: '400px' }; return (

Hello, world!

Here is an example control:
); } // React event handlers should be represented as fields instead of methods to ensure the "this" pointer // is bound correctly. This form does not work with virtual/override inheritance, so use regular methods // everywhere else. #onToggle = (sender: ToggleSwitch, args: IToggleEventArgs): void => { // eslint-disable-next-line no-console console.log('Toggle switch changed: ' + args.sliderPosition); }; }