Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public render() {
const { timezone, targetDisplayFormat, disabled, showCustomTarget, showLocalTimezone } = this.state;
const options = (
<>
<h5>Props</h5>
import { CustomTimezonePickerTarget } from "./components";
export interface ITimezonePickerExampleState {
disabled: boolean;
showCustomTarget: boolean;
showLocalTimezone: boolean;
targetDisplayFormat: TimezoneDisplayFormat;
timezone: string;
}
export class TimezonePickerExample extends React.PureComponent {
public state: ITimezonePickerExampleState = {
disabled: false,
showCustomTarget: false,
showLocalTimezone: true,
targetDisplayFormat: TimezoneDisplayFormat.COMPOSITE,
timezone: "",
};
private handleDisabledChange = handleBooleanChange(disabled => this.setState({ disabled }));
private handleShowLocalChange = handleBooleanChange(showLocalTimezone => this.setState({ showLocalTimezone }));
private handleCustomChildChange = handleBooleanChange(showCustomTarget => this.setState({ showCustomTarget }));
private handleFormatChange = handleStringChange((targetDisplayFormat: TimezoneDisplayFormat) =>
this.setState({ targetDisplayFormat }),
);
public render() {
const { timezone, targetDisplayFormat, disabled, showCustomTarget, showLocalTimezone } = this.state;
const options = (
<>
<h5>Props</h5>