From 943c378309a84ed142852c6584b53958df7817c8 Mon Sep 17 00:00:00 2001
From: Xianny <8582774+xianny@users.noreply.github.com>
Date: Fri, 11 Jan 2019 10:04:30 -0800
Subject: Implement tslint enum-naming to enforce PascalCase on enum members
 (#1474)

---
 .../ts/components/ui/lifecycle_raised_button.tsx   | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

(limited to 'packages/website/ts/components/ui/lifecycle_raised_button.tsx')

diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
index a8daf4102..f004dd47f 100644
--- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx
+++ b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
@@ -6,9 +6,9 @@ import * as React from 'react';
 const COMPLETE_STATE_SHOW_LENGTH_MS = 2000;
 
 enum ButtonState {
-    READY,
-    LOADING,
-    COMPLETE,
+    Ready,
+    Loading,
+    Complete,
 }
 
 interface LifeCycleRaisedButtonProps {
@@ -38,7 +38,7 @@ export class LifeCycleRaisedButton extends React.Component<LifeCycleRaisedButton
     constructor(props: LifeCycleRaisedButtonProps) {
         super(props);
         this.state = {
-            buttonState: ButtonState.READY,
+            buttonState: ButtonState.Ready,
         };
     }
     public componentWillUnmount(): void {
@@ -52,13 +52,13 @@ export class LifeCycleRaisedButton extends React.Component<LifeCycleRaisedButton
 
         let label;
         switch (this.state.buttonState) {
-            case ButtonState.READY:
+            case ButtonState.Ready:
                 label = this.props.labelReady;
                 break;
-            case ButtonState.LOADING:
+            case ButtonState.Loading:
                 label = this.props.labelLoading;
                 break;
-            case ButtonState.COMPLETE:
+            case ButtonState.Complete:
                 label = this.props.labelComplete;
                 break;
             default:
@@ -72,13 +72,13 @@ export class LifeCycleRaisedButton extends React.Component<LifeCycleRaisedButton
                 backgroundColor={this.props.backgroundColor}
                 labelColor={this.props.labelColor}
                 onClick={this.onClickAsync.bind(this)}
-                disabled={this.props.isDisabled || this.state.buttonState !== ButtonState.READY}
+                disabled={this.props.isDisabled || this.state.buttonState !== ButtonState.Ready}
             />
         );
     }
     public async onClickAsync(): Promise<void> {
         this.setState({
-            buttonState: ButtonState.LOADING,
+            buttonState: ButtonState.Loading,
         });
         const didSucceed = await this.props.onClickAsyncFn();
         if (this._didUnmount) {
@@ -86,16 +86,16 @@ export class LifeCycleRaisedButton extends React.Component<LifeCycleRaisedButton
         }
         if (didSucceed) {
             this.setState({
-                buttonState: ButtonState.COMPLETE,
+                buttonState: ButtonState.Complete,
             });
             this._buttonTimeoutId = window.setTimeout(() => {
                 this.setState({
-                    buttonState: ButtonState.READY,
+                    buttonState: ButtonState.Ready,
                 });
             }, COMPLETE_STATE_SHOW_LENGTH_MS);
         } else {
             this.setState({
-                buttonState: ButtonState.READY,
+                buttonState: ButtonState.Ready,
             });
         }
     }
-- 
cgit v1.2.3

