/* * Copyright 2016 Palantir Technologies, Inc. All rights reserved. * Licensed under the BSD-3 License as modified (the “License”); you may obtain a copy * of the license at https://github.com/palantir/blueprint/blob/master/LICENSE * and https://github.com/palantir/blueprint/blob/master/PATENTS */ import * as React from "react"; import { EditableText, Intent, Switch } from "@blueprintjs/core"; import BaseExample, { handleBooleanChange, handleNumberChange } from "./common/baseExample"; import { IntentSelect } from "./common/intentSelect"; export interface IEditableTextExampleState { intent?: Intent; report?: string; selectAllOnFocus?: boolean; title?: string; } export class EditableTextExample extends BaseExample { public state: IEditableTextExampleState = { report: "", selectAllOnFocus: false, title: "", }; private handleIntentChange = handleNumberChange((intent: Intent) => this.setState({ intent })); private toggleSelectAll = handleBooleanChange((selectAllOnFocus) => this.setState({ selectAllOnFocus })); protected renderExample() { return

; } protected renderOptions() { return [ [ , , ], ]; } private handleReportChange = (report: string) => this.setState({ report }); private handleTitleChange = (title: string) => this.setState({ title }); }