Skip to content

Commit

Permalink
feat(android-setup): detect-adb-step dialog implementation (#2802)
Browse files Browse the repository at this point in the history
* added the spinner to the detect-adb-step ui

* added a standalone scss file for android-setup styling. simplified detect-adb-step to just return the spinner and not call a method
  • Loading branch information
JGibson2019 authored Jun 5, 2020
1 parent 8a775e8 commit 4e7c346
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
.android-setup-spinner {
padding-top: 25%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@
// Licensed under the MIT License.
import { NamedFC } from 'common/react/named-fc';
import { CommonAndroidSetupStepProps } from 'electron/views/device-connect-view/components/android-setup/android-setup-types';
import { Spinner, SpinnerSize } from 'office-ui-fabric-react';
import * as React from 'react';

import { androidSetupSpinner } from '../android-setup/android-setup.scss';

export const DetectAdbStep = NamedFC<CommonAndroidSetupStepProps>(
'DetectAdbStep',
(props: CommonAndroidSetupStepProps) => {
return <>step: {props.androidSetupStoreData.currentStepId}</>;
return (
<Spinner
className={androidSetupSpinner}
size={SpinnerSize.large}
label="Loading..."
role="alert"
aria-live={props['aria-live']}
/>
);
},
);
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`DetectAdbStep renders 1`] = `
<React.Fragment>
step:
detect-adb
</React.Fragment>
<StyledSpinnerBase
className="androidSetupSpinner"
label="Loading..."
role="alert"
size={3}
/>
`;

0 comments on commit 4e7c346

Please sign in to comment.